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
ef41dabb
Commit
ef41dabb
authored
Apr 27, 1998
by
J"orn Rennecke
Committed by
Joern Rennecke
Apr 27, 1998
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* sh.h (LEGITIMIZE_RELOAD_ADDRESS): Define.
From-SVN: r19424
parent
22c4957e
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
64 additions
and
0 deletions
+64
-0
gcc/ChangeLog
+4
-0
gcc/config/sh/sh.h
+60
-0
No files found.
gcc/ChangeLog
View file @
ef41dabb
Mon Apr 27 17:22:48 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
* sh.h (LEGITIMIZE_RELOAD_ADDRESS): Define.
Mon Apr 27 08:55:23 1998 Michael Meissner <meissner@cygnus.com>
* system.h (abort): If abort is not defined, and neither is
...
...
gcc/config/sh/sh.h
View file @
ef41dabb
...
...
@@ -1213,6 +1213,66 @@ extern struct rtx_def *sh_builtin_saveregs ();
} \
}
/* A C compound statement that attempts to replace X, which is an address
that needs reloading, with a valid memory address for an operand of
mode MODE. WIN is a C statement label elsewhere in the code.
Like for LEGITIMIZE_ADDRESS, for the SH we try to get a normal form
of the address. That will allow inheritance of the address reloads. */
#define LEGITIMIZE_RELOAD_ADDRESS(X,MODE,OPNUM,TYPE,IND_LEVELS,WIN) \
{ \
if (GET_CODE (X) == PLUS \
&& (GET_MODE_SIZE (MODE) == 4 || GET_MODE_SIZE (MODE) == 8) \
&& GET_CODE (XEXP (X, 1)) == CONST_INT \
&& BASE_REGISTER_RTX_P (XEXP (X, 0)) \
&& ! (TARGET_SH3E && MODE == SFmode)) \
{ \
rtx index_rtx = XEXP (X, 1); \
HOST_WIDE_INT offset = INTVAL (index_rtx), offset_base; \
rtx sum; \
\
/* Instead of offset_base 128..131 use 124..127, so that \
simple add suffices. */
\
if (offset > 127) \
{ \
offset_base = ((offset + 4) & ~60) - 4; \
} \
else \
offset_base = offset & ~60; \
/* Sometimes the normal form does not suit DImode. We \
could avoid that by using smaller ranges, but that \
would give less optimized code when SImode is \
prevalent. */
\
if (GET_MODE_SIZE (MODE) + offset - offset_base <= 64) \
{ \
sum = gen_rtx (PLUS, Pmode, XEXP (X, 0), \
GEN_INT (offset_base)); \
X = gen_rtx (PLUS, Pmode, sum, GEN_INT (offset - offset_base));\
push_reload (sum, NULL_RTX, &XEXP (X, 0), NULL_PTR, \
BASE_REG_CLASS, Pmode, VOIDmode, 0, 0, (OPNUM), \
(TYPE)); \
goto WIN; \
} \
} \
/* We must re-recognize what we created before. */
\
else if (GET_CODE (X) == PLUS \
&& (GET_MODE_SIZE (MODE) == 4 || GET_MODE_SIZE (MODE) == 8) \
&& GET_CODE (XEXP (X, 0)) == PLUS \
&& GET_CODE (XEXP (XEXP (X, 0), 1)) == CONST_INT \
&& BASE_REGISTER_RTX_P (XEXP (XEXP (X, 0), 0)) \
&& GET_CODE (XEXP (X, 1)) == CONST_INT \
&& ! (TARGET_SH3E && MODE == SFmode)) \
{ \
/* Because this address is so complex, we know it must have \
been created by LEGITIMIZE_RELOAD_ADDRESS before; thus, \
it is already unshared, and needs no further unsharing. */
\
push_reload (XEXP ((X), 0), NULL_RTX, &XEXP ((X), 0), NULL_PTR, \
BASE_REG_CLASS, Pmode, VOIDmode, 0, 0, (OPNUM), (TYPE));\
goto WIN; \
} \
}
/* Go to LABEL if ADDR (a legitimate address expression)
has an effect that depends on the machine mode it is used for.
...
...
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