Commit 51f0646f by Jeffrey A Law Committed by Jeff Law

loop.c (move_movables): Note issues with replacing REGs with SUBREGs.

�
        * loop.c (move_movables): Note issues with replacing REGs with
        SUBREGs.
        * mips.h (GO_IF_LEGITIMATE_ADDRESS): Handle SUBREGs properly.

From-SVN: r27573
parent 048f60dc
Thu Jun 17 14:25:08 1999 Jeffrey A Law (law@cygnus.com)
* loop.c (move_movables): Note issues with replacing REGs with
SUBREGs.
* mips.h (GO_IF_LEGITIMATE_ADDRESS): Handle SUBREGs properly.
Thu Jun 17 13:28:30 1999 David O'Brien <obrien@FreeBSD.org> Thu Jun 17 13:28:30 1999 David O'Brien <obrien@FreeBSD.org>
* i386/freebsd-elf.h (LINK_SPEC): Fix typo. * i386/freebsd-elf.h (LINK_SPEC): Fix typo.
......
...@@ -2858,6 +2858,9 @@ typedef struct mips_args { ...@@ -2858,6 +2858,9 @@ typedef struct mips_args {
GO_DEBUG_RTX (xinsn); \ GO_DEBUG_RTX (xinsn); \
} \ } \
\ \
while (GET_CODE (xinsn) == SUBREG) \
xinsn = SUBREG_REG (xinsn); \
\
/* The mips16 can only use the stack pointer as a base register when \ /* The mips16 can only use the stack pointer as a base register when \
loading SImode or DImode values. */ \ loading SImode or DImode values. */ \
if (GET_CODE (xinsn) == REG && REG_MODE_OK_FOR_BASE_P (xinsn, MODE)) \ if (GET_CODE (xinsn) == REG && REG_MODE_OK_FOR_BASE_P (xinsn, MODE)) \
...@@ -2873,6 +2876,8 @@ typedef struct mips_args { ...@@ -2873,6 +2876,8 @@ typedef struct mips_args {
register rtx xlow0 = XEXP (xinsn, 0); \ register rtx xlow0 = XEXP (xinsn, 0); \
register rtx xlow1 = XEXP (xinsn, 1); \ register rtx xlow1 = XEXP (xinsn, 1); \
\ \
while (GET_CODE (xlow0) == SUBREG) \
xlow0 = SUBREG_REG (xlow0); \
if (GET_CODE (xlow0) == REG \ if (GET_CODE (xlow0) == REG \
&& REG_MODE_OK_FOR_BASE_P (xlow0, MODE) \ && REG_MODE_OK_FOR_BASE_P (xlow0, MODE) \
&& mips_check_split (xlow1, MODE)) \ && mips_check_split (xlow1, MODE)) \
...@@ -2883,8 +2888,16 @@ typedef struct mips_args { ...@@ -2883,8 +2888,16 @@ typedef struct mips_args {
{ \ { \
register rtx xplus0 = XEXP (xinsn, 0); \ register rtx xplus0 = XEXP (xinsn, 0); \
register rtx xplus1 = XEXP (xinsn, 1); \ register rtx xplus1 = XEXP (xinsn, 1); \
register enum rtx_code code0 = GET_CODE (xplus0); \ register enum rtx_code code0; \
register enum rtx_code code1 = GET_CODE (xplus1); \ register enum rtx_code code1; \
\
while (GET_CODE (xplus0) == SUBREG) \
xplus0 = SUBREG_REG (xplus0); \
code0 = GET_CODE (xplus0); \
\
while (GET_CODE (xplus1) == SUBREG) \
xplus1 = SUBREG_REG (xplus1); \
code1 = GET_CODE (xplus1); \
\ \
/* The mips16 can only use the stack pointer as a base register \ /* The mips16 can only use the stack pointer as a base register \
when loading SImode or DImode values. */ \ when loading SImode or DImode values. */ \
......
...@@ -2170,7 +2170,14 @@ move_movables (movables, threshold, insn_count, loop_start, end, nregs) ...@@ -2170,7 +2170,14 @@ move_movables (movables, threshold, insn_count, loop_start, end, nregs)
/* Schedule the reg loaded by M1 /* Schedule the reg loaded by M1
for replacement so that shares the reg of M. for replacement so that shares the reg of M.
If the modes differ (only possible in restricted If the modes differ (only possible in restricted
circumstances, make a SUBREG. */ circumstances, make a SUBREG.
Note this assumes that the target dependent files
treat REG and SUBREG equally, including within
GO_IF_LEGITIMATE_ADDRESS and in all the
predicates since we never verify that replacing the
original register with a SUBREG results in a
recognizable insn. */
if (GET_MODE (m->set_dest) == GET_MODE (m1->set_dest)) if (GET_MODE (m->set_dest) == GET_MODE (m1->set_dest))
reg_map[m1->regno] = m->set_dest; reg_map[m1->regno] = m->set_dest;
else else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment