Commit f295bdb5 by Andrew Haley Committed by Joern Rennecke

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
parent cdd59e7b
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>
......
......@@ -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 \
......
......@@ -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,
......
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