target-supports.exp (check_effective_target_arm_prefer_ldrd_strd): New procedure.
authorGreta Yorsh <greta.yorsh@arm.com>
Fri, 19 Oct 2012 16:33:28 +0000 (17:33 +0100)
committerGreta Yorsh <gretay@gcc.gnu.org>
Fri, 19 Oct 2012 16:33:28 +0000 (17:33 +0100)
2012-10-19  Greta Yorsh  <Greta.Yorsh@arm.com>

gcc/testsuite/

        * gcc.target/arm/target-supports.exp (check_effective_target_arm_prefer_ldrd_strd):
        New procedure.

gcc/

* doc/sourcebuild.texi (Effective-Target Keywords): Document
new effective target keyword arm_prefer_ldrd_strd.

From-SVN: r192615

gcc/ChangeLog
gcc/doc/sourcebuild.texi
gcc/testsuite/ChangeLog
gcc/testsuite/lib/target-supports.exp

index 7a82d9fcaf64ffae2422c8a84b0b89442589f9d9..f599d1e9ebb75949e763f6b99f81049193a8a440 100644 (file)
@@ -1,3 +1,8 @@
+2012-10-19  Greta Yorsh  <Greta.Yorsh@arm.com>
+
+       * doc/sourcebuild.texi (Effective-Target Keywords): Document
+       new effective target keyword arm_prefer_ldrd_strd.
+
 2012-10-19  Richard Guenther  <rguenther@suse.de>
 
        PR tree-optimization/54981
index 2efd79929370080f2ad36c374330c3a217507a85..89e7712b8d4dc88f286cb9ed40191df4f4b4f7e3 100644 (file)
@@ -1555,6 +1555,11 @@ ARM target generates Thumb-2 code for @code{-mthumb}.
 @item arm_vfp_ok
 ARM target supports @code{-mfpu=vfp -mfloat-abi=softfp}.
 Some multilibs may be incompatible with these options.
+
+@item arm_prefer_ldrd_strd
+ARM target prefers @code{LDRD} and @code{STRD} instructions over
+@code{LDM} and @code{STM} instructions.
+
 @end table
 
 @subsubsection MIPS-specific attributes
index a7e4d3e30410f41153e8991b25a6b7f8489a44dd..be805f2f0331d7f32e4554f83e3f36bf0862eecb 100644 (file)
@@ -1,3 +1,8 @@
+2012-10-19  Greta Yorsh  <Greta.Yorsh@arm.com>
+
+       * lib/target-supports.exp (check_effective_target_arm_prefer_ldrd_strd):
+       New procedure.
+
 2012-10-19  Richard Guenther  <rguenther@suse.de>
 
        PR tree-optimization/54981
index 2ab630e4d5beb680fb214628d4b46e567678dd5d..944143bedc05981be1ab5feef0431026c7cabb63 100644 (file)
@@ -2464,6 +2464,18 @@ proc check_effective_target_arm_iwmmxt_ok { } {
     }
 }
 
+# Return true if LDRD/STRD instructions are prefered over LDM/STM instructions
+# for an ARM target.
+proc check_effective_target_arm_prefer_ldrd_strd { } {
+    if { ![check_effective_target_arm32] } {
+      return 0;
+    }
+
+    return [check_no_messages_and_pattern arm_prefer_ldrd_strd "strd\tr" assembly {
+        void foo (int *p) { p[0] = 1; p[1] = 0;}
+    }  "-O2 -mthumb" ]
+}
+
 # Return 1 if this is a PowerPC target with floating-point registers.
 
 proc check_effective_target_powerpc_fprs { } {