[arm] Fix iwmmxt load/store offset
Paul Brook
paul@codesourcery.com
Mon Apr 26 13:44:00 GMT 2004
Patch below fixes iwmmxt constant indexed load/store offsets (+-256 words, not
bytes).
Tested with cross to arm-none-elf.
Ok?
Paul
2004-04-26 Paul Brook <paul@codesourcery.com>
* config/arm/arm.c (arm_legitimate_index_p): Correct iwmmxt offsets.
Index: arm.c
===================================================================
RCS file: /var/cvsroot/gcc-cvs/gcc/gcc/config/arm/arm.c,v
retrieving revision 1.350
diff -u -p -r1.350 arm.c
--- a/arm.c 26 Apr 2004 10:32:53 -0000 1.350
+++ b/arm.c 26 Apr 2004 13:26:24 -0000
@@ -3104,8 +3104,9 @@ arm_legitimate_index_p (enum machine_mod
if (TARGET_REALLY_IWMMXT && VALID_IWMMXT_REG_MODE (mode))
return (code == CONST_INT
- && INTVAL (index) < 256
- && INTVAL (index) > -256);
+ && INTVAL (index) < 1024
+ && INTVAL (index) > -1024
+ && (INTVAL (index) & 3) == 0);
if (GET_MODE_SIZE (mode) <= 4
&& ! (arm_arch4
More information about the Gcc-patches
mailing list