From d823129112c58fdadc5befd2c04f6b612c966522 Mon Sep 17 00:00:00 2001 From: law Date: Mon, 27 Oct 1997 23:07:37 +0000 Subject: * mn10300.h (GO_IF_LEGITIMATE_ADDRESS): Disable reg+reg. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@16209 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/config/mn10300/mn10300.h | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'gcc/config/mn10300') diff --git a/gcc/config/mn10300/mn10300.h b/gcc/config/mn10300/mn10300.h index 4c32b8dfd6a..252a70f1846 100644 --- a/gcc/config/mn10300/mn10300.h +++ b/gcc/config/mn10300/mn10300.h @@ -639,7 +639,18 @@ extern struct rtx_def *mn10300_builtin_saveregs (); The other macros defined here are used only in GO_IF_LEGITIMATE_ADDRESS, except for CONSTANT_ADDRESS_P which is actually - machine-independent. */ + machine-independent. + + On the mn10300, the value in the address register must be + in the same memory space/segment as the effective address. + + This is problematical for reload since it does not understand + that base+index != index+base in a memory reference. + + Note it is still possible to use reg+reg addressing modes, + it's just much more difficult. For a discussion of a possible + workaround and solution, see the comments in pa.c before the + function record_unscaled_index_insn_codes. */ /* Accept either REG or SUBREG where a register is valid. */ @@ -667,10 +678,6 @@ extern struct rtx_def *mn10300_builtin_saveregs (); { \ if (GET_CODE (index) == CONST_INT) \ goto ADDR; \ - if (REG_P (index) \ - && REG_OK_FOR_INDEX_P (index) \ - && GET_MODE_SIZE (mode) <= GET_MODE_SIZE (word_mode)) \ - goto ADDR; \ } \ } \ } -- cgit v1.2.1