pa.h (LEGITIMIZE_RELOAD_ADDRESS): Handle addresses created by LEGITIMIZE_RELOAD_ADDRESS.

* pa.h (LEGITIMIZE_RELOAD_ADDRESS): Handle addresses created by
        LEGITIMIZE_RELOAD_ADDRESS.
        * tm.texi (LEGITIMIZE_RELOAD_ADDRESS): Note that this macro must be
        able to handle addresses created by previous invocations of the macro.

From-SVN: r21014
This commit is contained in:
Jeffrey A Law 1998-07-08 22:05:40 +00:00 committed by Jeff Law
parent 2710ffc868
commit 5f0c590d40
3 changed files with 22 additions and 8 deletions

View File

@ -1,5 +1,10 @@
Wed Jul 8 21:43:14 1998 Jeffrey A Law (law@cygnus.com)
* pa.h (LEGITIMIZE_RELOAD_ADDRESS): Handle addresses created by
LEGITIMIZE_RELOAD_ADDRESS.
* tm.texi (LEGITIMIZE_RELOAD_ADDRESS): Note that this macro must be
able to handle addresses created by previous invocations of the macro.
* flow.c (find_auto_inc): Remove most recent change. Real bug was
elsewhere.

View File

@ -1638,14 +1638,22 @@ extern struct rtx_def *hppa_builtin_saveregs ();
#define LEGITIMIZE_RELOAD_ADDRESS(AD, MODE, OPNUM, TYPE, IND, WIN) \
do { \
int offset, newoffset, mask; \
rtx new, temp = NULL_RTX; \
mask = GET_MODE_CLASS (MODE) == MODE_FLOAT ? 0x1f : 0x3fff; \
\
if (optimize \
&& GET_CODE (AD) == PLUS \
&& GET_CODE (XEXP (AD, 0)) == REG \
&& GET_CODE (XEXP (AD, 1)) == CONST_INT) \
&& GET_CODE (AD) == PLUS) \
temp = simplify_binary_operation (PLUS, Pmode, \
XEXP (AD, 0), XEXP (AD, 1)); \
\
new = temp ? temp : AD; \
\
if (optimize \
&& GET_CODE (new) == PLUS \
&& GET_CODE (XEXP (new, 0)) == REG \
&& GET_CODE (XEXP (new, 1)) == CONST_INT) \
{ \
offset = INTVAL (XEXP ((AD), 1)); \
offset = INTVAL (XEXP ((new), 1)); \
\
/* Choose rounding direction. Round up if we are >= halfway. */ \
if ((offset & mask) >= ((mask + 1) / 2)) \
@ -1656,11 +1664,8 @@ do { \
if (newoffset != 0 \
&& VAL_14_BITS_P (newoffset)) \
{ \
rtx temp; \
\
/* Unshare the sum as well. */ \
AD = copy_rtx (AD); \
temp = gen_rtx_PLUS (Pmode, XEXP (AD, 0), \
temp = gen_rtx_PLUS (Pmode, XEXP (new, 0), \
GEN_INT (newoffset)); \
AD = gen_rtx_PLUS (Pmode, temp, GEN_INT (offset - newoffset));\
push_reload (XEXP (AD, 0), 0, &XEXP (AD, 0), 0, \

View File

@ -4310,6 +4310,10 @@ to know something of how reload works in order to effectively use this,
and it is quite easy to produce macros that build in too much knowledge
of reload internals.
@emph{Note}: This macro must be able to reload an address created by a
previous invocation of this macro. If it fails to handle such addresses
then the compiler may generate incorrect code or abort.
@findex push_reload
The macro definition should use @code{push_reload} to indicate parts that
need reloading; @var{opnum}, @var{type} and @var{ind_levels} are usually