summaryrefslogtreecommitdiff
path: root/gcc/recog.c
diff options
context:
space:
mode:
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>1994-11-16 21:10:09 +0000
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>1994-11-16 21:10:09 +0000
commit51356f864933f664f7dfbf6e25ddcd97b587441a (patch)
tree036743ae971e4dddc0469a67fd6d6272b0801af8 /gcc/recog.c
parentd70e58b6facc61184689890af429c7f0def003e8 (diff)
downloadgcc-51356f864933f664f7dfbf6e25ddcd97b587441a.tar.gz
Check target endianness at run time, not compile time
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@8470 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/recog.c')
-rw-r--r--gcc/recog.c23
1 files changed, 10 insertions, 13 deletions
diff --git a/gcc/recog.c b/gcc/recog.c
index a09a1d93e35..4177e072cad 100644
--- a/gcc/recog.c
+++ b/gcc/recog.c
@@ -423,11 +423,10 @@ validate_replace_rtx_1 (loc, from, to, object)
enum machine_mode mode = GET_MODE (x);
rtx new;
-#if BYTES_BIG_ENDIAN
- offset += (MIN (UNITS_PER_WORD,
- GET_MODE_SIZE (GET_MODE (SUBREG_REG (x))))
- - MIN (UNITS_PER_WORD, GET_MODE_SIZE (mode)));
-#endif
+ if (BYTES_BIG_ENDIAN)
+ offset += (MIN (UNITS_PER_WORD,
+ GET_MODE_SIZE (GET_MODE (SUBREG_REG (x))))
+ - MIN (UNITS_PER_WORD, GET_MODE_SIZE (mode)));
new = gen_rtx (MEM, mode, plus_constant (XEXP (to, 0), offset));
MEM_VOLATILE_P (new) = MEM_VOLATILE_P (to);
@@ -474,10 +473,9 @@ validate_replace_rtx_1 (loc, from, to, object)
/* If the bytes and bits are counted differently, we
must adjust the offset. */
-#if BYTES_BIG_ENDIAN != BITS_BIG_ENDIAN
- offset = (GET_MODE_SIZE (is_mode) - GET_MODE_SIZE (wanted_mode)
- - offset);
-#endif
+ if (BYTES_BIG_ENDIAN != BITS_BIG_ENDIAN)
+ offset = (GET_MODE_SIZE (is_mode) - GET_MODE_SIZE (wanted_mode)
+ - offset);
pos %= GET_MODE_BITSIZE (wanted_mode);
@@ -1083,10 +1081,9 @@ indirect_operand (op, mode)
register int offset = SUBREG_WORD (op) * UNITS_PER_WORD;
rtx inner = SUBREG_REG (op);
-#if BYTES_BIG_ENDIAN
- offset -= (MIN (UNITS_PER_WORD, GET_MODE_SIZE (GET_MODE (op)))
- - MIN (UNITS_PER_WORD, GET_MODE_SIZE (GET_MODE (inner))));
-#endif
+ if (BYTES_BIG_ENDIAN)
+ offset -= (MIN (UNITS_PER_WORD, GET_MODE_SIZE (GET_MODE (op)))
+ - MIN (UNITS_PER_WORD, GET_MODE_SIZE (GET_MODE (inner))));
if (mode != VOIDmode && GET_MODE (op) != mode)
return 0;