This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH][ARM] VFP load/store index


Hi,

This patch adds the VFP load/store constant index ranges to arm_legitimate_index_p(), which curiously has not already been added.

Currently without this patch, the VFP index ranges for SFmode lands into the +-4096 case, while DFmode gets handled by the LDRD/STRD index range of +-256; these are too wide and too narrow, respectively. The ARM coprocessor load/store index range of +-1020 is added for VFP in this patch.

C.L.


2009-07-30 Chung-Lin Tang <cltang@pllab.cs.nthu.edu.tw>


   gcc/
   * config/arm/arm.c (arm_legitimate_index_p): Add VFP load/store
   index range case.

Index: config/arm/arm.c
===================================================================
--- config/arm/arm.c	(revision 150217)
+++ config/arm/arm.c	(working copy)
@@ -4251,6 +4251,13 @@
 	    && INTVAL (index) > -1024
 	    && (INTVAL (index) & 3) == 0);
 
+  if (TARGET_HARD_FLOAT && TARGET_VFP
+      && (mode == SFmode || mode == DFmode))
+    return (code == CONST_INT
+	    && INTVAL (index) < 1024
+	    && INTVAL (index) > -1024
+	    && (INTVAL (index) & 3) == 0);
+
   if (TARGET_NEON
       && (VALID_NEON_DREG_MODE (mode) || VALID_NEON_QREG_MODE (mode)))
     return (code == CONST_INT

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]