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
106a52b7
Commit
106a52b7
authored
Dec 19, 2014
by
Kaz Kojima
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* [SH] Add -mlra option.
From-SVN: r218888
parent
14133a4d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
0 deletions
+24
-0
gcc/ChangeLog
+7
-0
gcc/config/sh/sh.c
+14
-0
gcc/config/sh/sh.opt
+3
-0
No files found.
gcc/ChangeLog
View file @
106a52b7
2014
-
12
-
19
Kaz
Kojima
<
kkojima
@
gcc
.
gnu
.
org
>
2014
-
12
-
19
Kaz
Kojima
<
kkojima
@
gcc
.
gnu
.
org
>
*
config
/
sh
/
sh
.
c
(
sh_lra_p
):
New
function
.
(
TARGET_LRA_P
):
Define
.
(
sh_legitimize_reload_address
):
Return
false
if
sh_lra_p
is
true
.
*
config
/
sh
/
sh
.
opt
(
mlra
):
New
option
.
2014
-
12
-
19
Kaz
Kojima
<
kkojima
@
gcc
.
gnu
.
org
>
*
lra
-
constraints
.
c
(
process_address_1
):
Try
if
target
can
split
*
lra
-
constraints
.
c
(
process_address_1
):
Try
if
target
can
split
displacement
with
targetm
.
legitimize_address_displacement
.
displacement
with
targetm
.
legitimize_address_displacement
.
*
target
.
def
(
legitimize_address_displacement
):
New
hook
.
*
target
.
def
(
legitimize_address_displacement
):
New
hook
.
gcc/config/sh/sh.c
View file @
106a52b7
...
@@ -222,6 +222,7 @@ static int sh_mode_after (int, int, rtx_insn *);
...
@@ -222,6 +222,7 @@ static int sh_mode_after (int, int, rtx_insn *);
static
int
sh_mode_entry
(
int
);
static
int
sh_mode_entry
(
int
);
static
int
sh_mode_exit
(
int
);
static
int
sh_mode_exit
(
int
);
static
int
sh_mode_priority
(
int
entity
,
int
n
);
static
int
sh_mode_priority
(
int
entity
,
int
n
);
static
bool
sh_lra_p
(
void
);
static
rtx
mark_constant_pool_use
(
rtx
);
static
rtx
mark_constant_pool_use
(
rtx
);
static
tree
sh_handle_interrupt_handler_attribute
(
tree
*
,
tree
,
tree
,
static
tree
sh_handle_interrupt_handler_attribute
(
tree
*
,
tree
,
tree
,
...
@@ -620,6 +621,9 @@ static const struct attribute_spec sh_attribute_table[] =
...
@@ -620,6 +621,9 @@ static const struct attribute_spec sh_attribute_table[] =
#undef TARGET_ENCODE_SECTION_INFO
#undef TARGET_ENCODE_SECTION_INFO
#define TARGET_ENCODE_SECTION_INFO sh_encode_section_info
#define TARGET_ENCODE_SECTION_INFO sh_encode_section_info
#undef TARGET_LRA_P
#define TARGET_LRA_P sh_lra_p
#undef TARGET_SECONDARY_RELOAD
#undef TARGET_SECONDARY_RELOAD
#define TARGET_SECONDARY_RELOAD sh_secondary_reload
#define TARGET_SECONDARY_RELOAD sh_secondary_reload
...
@@ -10484,6 +10488,9 @@ sh_legitimize_reload_address (rtx *p, machine_mode mode, int opnum,
...
@@ -10484,6 +10488,9 @@ sh_legitimize_reload_address (rtx *p, machine_mode mode, int opnum,
enum
reload_type
type
=
(
enum
reload_type
)
itype
;
enum
reload_type
type
=
(
enum
reload_type
)
itype
;
const
int
mode_sz
=
GET_MODE_SIZE
(
mode
);
const
int
mode_sz
=
GET_MODE_SIZE
(
mode
);
if
(
sh_lra_p
())
return
false
;
if
(
!
ALLOW_INDEXED_ADDRESS
if
(
!
ALLOW_INDEXED_ADDRESS
&&
GET_CODE
(
*
p
)
==
PLUS
&&
GET_CODE
(
*
p
)
==
PLUS
&&
REG_P
(
XEXP
(
*
p
,
0
))
&&
REG_P
(
XEXP
(
*
p
,
1
)))
&&
REG_P
(
XEXP
(
*
p
,
0
))
&&
REG_P
(
XEXP
(
*
p
,
1
)))
...
@@ -13774,6 +13781,13 @@ sh_mode_priority (int entity ATTRIBUTE_UNUSED, int n)
...
@@ -13774,6 +13781,13 @@ sh_mode_priority (int entity ATTRIBUTE_UNUSED, int n)
return
((
TARGET_FPU_SINGLE
!=
0
)
^
(
n
)
?
FP_MODE_SINGLE
:
FP_MODE_DOUBLE
);
return
((
TARGET_FPU_SINGLE
!=
0
)
^
(
n
)
?
FP_MODE_SINGLE
:
FP_MODE_DOUBLE
);
}
}
/* Return true if we use LRA instead of reload pass. */
static
bool
sh_lra_p
(
void
)
{
return
sh_lra_flag
;
}
/* Implement TARGET_USE_BY_PIECES_INFRASTRUCTURE_P. */
/* Implement TARGET_USE_BY_PIECES_INFRASTRUCTURE_P. */
static
bool
static
bool
...
...
gcc/config/sh/sh.opt
View file @
106a52b7
...
@@ -360,3 +360,6 @@ mfsrra
...
@@ -360,3 +360,6 @@ mfsrra
Target Var(TARGET_FSRRA)
Target Var(TARGET_FSRRA)
Enable the use of the fsrra instruction
Enable the use of the fsrra instruction
mlra
Target Report Var(sh_lra_flag) Init(0) Save
Use LRA instead of reload (transitional)
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