Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
66825a30
Commit
66825a30
authored
Dec 19, 2017
by
Claudiu Zissulescu
Committed by
Claudiu Zissulescu
Dec 19, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
commit_message
From-SVN: r255823
parent
b68a1689
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
55 additions
and
12 deletions
+55
-12
gcc/ChangeLog
+7
-0
gcc/config/arc/arc.c
+48
-12
No files found.
gcc/ChangeLog
View file @
66825a30
2017
-
12
-
19
Claudiu
Zissulescu
<
claziss
@
synopsys
.
com
>
*
config
/
arc
/
arc
.
c
(
overriderregs
):
New
variable
.
(
arc_override_options
):
Track
fixed
/
call
saved
/
call
options
.
(
arc_conditional_register_usage
):
Check
against
overrideregs
variable
whenever
we
change
register
properties
.
2017
-
12
-
19
Nathan
Sidwell
<
nathan
@
acm
.
org
>
*
opts
.
c
(
finish_options
):
Don
't prefix dump_base_name if it
gcc/config/arc/arc.c
View file @
66825a30
...
...
@@ -73,6 +73,9 @@ along with GCC; see the file COPYING3. If not see
static
char
arc_cpu_name
[
10
]
=
""
;
static
const
char
*
arc_cpu_string
=
arc_cpu_name
;
/* Track which regs are set fixed/call saved/call used from commnad line. */
HARD_REG_SET
overrideregs
;
/* Maximum size of a loop. */
#define ARC_MAX_LOOP_LENGTH 4095
...
...
@@ -1099,6 +1102,30 @@ arc_override_options (void)
}
}
CLEAR_HARD_REG_SET
(
overrideregs
);
if
(
common_deferred_options
)
{
vec
<
cl_deferred_option
>
v
=
*
((
vec
<
cl_deferred_option
>
*
)
common_deferred_options
);
int
reg
,
nregs
,
j
;
FOR_EACH_VEC_ELT
(
v
,
i
,
opt
)
{
switch
(
opt
->
opt_index
)
{
case
OPT_ffixed_
:
case
OPT_fcall_used_
:
case
OPT_fcall_saved_
:
if
((
reg
=
decode_reg_name_and_count
(
opt
->
arg
,
&
nregs
))
>=
0
)
for
(
j
=
reg
;
j
<
reg
+
nregs
;
j
++
)
SET_HARD_REG_BIT
(
overrideregs
,
j
);
break
;
default
:
break
;
}
}
}
/* Set cpu flags accordingly to architecture/selected cpu. The cpu
specific flags are set in arc-common.c. The architecture forces
the default hardware configurations in, regardless what command
...
...
@@ -1628,14 +1655,20 @@ arc_conditional_register_usage (void)
/* For ARCv2 the core register set is changed. */
strcpy
(
rname29
,
"ilink"
);
strcpy
(
rname30
,
"r30"
);
call_used_regs
[
30
]
=
1
;
fixed_regs
[
30
]
=
0
;
arc_regno_reg_class
[
30
]
=
WRITABLE_CORE_REGS
;
SET_HARD_REG_BIT
(
reg_class_contents
[
WRITABLE_CORE_REGS
],
30
);
SET_HARD_REG_BIT
(
reg_class_contents
[
CHEAP_CORE_REGS
],
30
);
SET_HARD_REG_BIT
(
reg_class_contents
[
GENERAL_REGS
],
30
);
SET_HARD_REG_BIT
(
reg_class_contents
[
MPY_WRITABLE_CORE_REGS
],
30
);
if
(
!
TEST_HARD_REG_BIT
(
overrideregs
,
30
))
{
/* No user interference. Set the r30 to be used by the
compiler. */
call_used_regs
[
30
]
=
1
;
fixed_regs
[
30
]
=
0
;
arc_regno_reg_class
[
30
]
=
WRITABLE_CORE_REGS
;
SET_HARD_REG_BIT
(
reg_class_contents
[
WRITABLE_CORE_REGS
],
30
);
SET_HARD_REG_BIT
(
reg_class_contents
[
CHEAP_CORE_REGS
],
30
);
SET_HARD_REG_BIT
(
reg_class_contents
[
GENERAL_REGS
],
30
);
SET_HARD_REG_BIT
(
reg_class_contents
[
MPY_WRITABLE_CORE_REGS
],
30
);
}
}
if
(
TARGET_MUL64_SET
)
...
...
@@ -1877,11 +1910,14 @@ arc_conditional_register_usage (void)
SET_HARD_REG_BIT
(
reg_class_contents
[
MPY_WRITABLE_CORE_REGS
],
ACCL_REGNO
);
SET_HARD_REG_BIT
(
reg_class_contents
[
MPY_WRITABLE_CORE_REGS
],
ACCH_REGNO
);
/* Allow the compiler to freely use them. */
fixed_regs
[
ACCL_REGNO
]
=
0
;
fixed_regs
[
ACCH_REGNO
]
=
0
;
/* Allow the compiler to freely use them. */
if
(
!
TEST_HARD_REG_BIT
(
overrideregs
,
ACCL_REGNO
))
fixed_regs
[
ACCL_REGNO
]
=
0
;
if
(
!
TEST_HARD_REG_BIT
(
overrideregs
,
ACCH_REGNO
))
fixed_regs
[
ACCH_REGNO
]
=
0
;
arc_hard_regno_modes
[
ACC_REG_FIRST
]
=
D_MODES
;
if
(
!
fixed_regs
[
ACCH_REGNO
]
&&
!
fixed_regs
[
ACCL_REGNO
])
arc_hard_regno_modes
[
ACC_REG_FIRST
]
=
D_MODES
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment