diff options
author | Andrew Haley <aph@cygnus.com> | 2000-02-15 23:25:28 +0000 |
---|---|---|
committer | Joern Rennecke <amylaar@gcc.gnu.org> | 2000-02-15 23:25:28 +0000 |
commit | f295bdb5eb37ae58628d68dd74d7067591ee29ee (patch) | |
tree | a25a657c91463ebf935fdb3e96d4f7bf6712ddec | |
parent | cdd59e7bdf1b6b4a5c42e81d4f2955eb4f7dd3fd (diff) | |
download | gcc-f295bdb5eb37ae58628d68dd74d7067591ee29ee.zip gcc-f295bdb5eb37ae58628d68dd74d7067591ee29ee.tar.gz gcc-f295bdb5eb37ae58628d68dd74d7067591ee29ee.tar.bz2 |
sh.md: Guard insn splits against illegal registers.
* config/sh/sh.md: Guard insn splits against illegal registers.
* config/sh/sh.h: Correct comment about macros.
From-SVN: r31994
-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 e315302..2638364 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 a3870df..df3b667 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 237f774..61720e0 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, |