diff options
author | amylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-02-15 23:25:28 +0000 |
---|---|---|
committer | amylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-02-15 23:25:28 +0000 |
commit | 82eb11029e6a84cc342178e50b15827facb5f23f (patch) | |
tree | a25a657c91463ebf935fdb3e96d4f7bf6712ddec | |
parent | f7496569f8a8d46280a15f21b26823c616202b7d (diff) | |
download | ppe42-gcc-82eb11029e6a84cc342178e50b15827facb5f23f.tar.gz ppe42-gcc-82eb11029e6a84cc342178e50b15827facb5f23f.zip |
* config/sh/sh.md: Guard insn splits against illegal registers.
* config/sh/sh.h: Correct comment about macros.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@31994 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/sh/sh.h | 4 | ||||
-rw-r--r-- | gcc/config/sh/sh.md | 6 |
3 files changed, 10 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e315302d136..263836457ae 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +Tue Feb 15 23:22:26 2000 Andrew Haley <aph@cygnus.com> + + * config/sh/sh.md: Guard insn splits against illegal registers. + * config/sh/sh.h: Correct comment about macros. + Tue Feb 15 22:30:36 2000 J"orn Rennecke <amylaar@cygnus.co.uk> Andrew MacLeod <amacleod@cygnus.com> diff --git a/gcc/config/sh/sh.h b/gcc/config/sh/sh.h index a3870df4832..df3b667e782 100644 --- a/gcc/config/sh/sh.h +++ b/gcc/config/sh/sh.h @@ -1269,9 +1269,7 @@ extern int current_function_anonymous_args; /* GO_IF_LEGITIMATE_ADDRESS recognizes an RTL expression that is a valid memory address for an instruction. The MODE argument is the machine mode for the MEM expression - that wants to use this address. - - The other macros defined here are used only in GO_IF_LEGITIMATE_ADDRESS. */ + that wants to use this address. */ #define MODE_DISP_OK_4(X,MODE) \ (GET_MODE_SIZE (MODE) == 4 && (unsigned) INTVAL (X) < 64 \ diff --git a/gcc/config/sh/sh.md b/gcc/config/sh/sh.md index 237f774298d..61720e07795 100644 --- a/gcc/config/sh/sh.md +++ b/gcc/config/sh/sh.md @@ -2768,7 +2768,8 @@ FAIL; reg = XEXP (addr, 0); const_int = XEXP (addr, 1); - if (GET_CODE (reg) != REG || GET_CODE (const_int) != CONST_INT) + if (! (BASE_REGISTER_RTX_P (reg) && INDEX_REGISTER_RTX_P (operands[2]) + && GET_CODE (const_int) == CONST_INT)) FAIL; emit_move_insn (operands[2], const_int); emit_move_insn (operands[0], @@ -2794,7 +2795,8 @@ FAIL; reg = XEXP (addr, 0); const_int = XEXP (addr, 1); - if (GET_CODE (reg) != REG || GET_CODE (const_int) != CONST_INT) + if (! (BASE_REGISTER_RTX_P (reg) && INDEX_REGISTER_RTX_P (operands[2]) + && GET_CODE (const_int) == CONST_INT)) FAIL; emit_move_insn (operands[2], const_int); emit_move_insn (change_address (operands[1], VOIDmode, |