From cf5607f85aba4e94b2feda9c9ecf4f1da1edc27e Mon Sep 17 00:00:00 2001 From: Greta Yorsh Date: Fri, 19 Oct 2012 17:33:28 +0100 Subject: [PATCH] target-supports.exp (check_effective_target_arm_prefer_ldrd_strd): New procedure. 2012-10-19 Greta Yorsh 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 | 5 +++++ gcc/doc/sourcebuild.texi | 5 +++++ gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/lib/target-supports.exp | 12 ++++++++++++ 4 files changed, 27 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7a82d9fcaf6..f599d1e9ebb 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2012-10-19 Greta Yorsh + + * doc/sourcebuild.texi (Effective-Target Keywords): Document + new effective target keyword arm_prefer_ldrd_strd. + 2012-10-19 Richard Guenther PR tree-optimization/54981 diff --git a/gcc/doc/sourcebuild.texi b/gcc/doc/sourcebuild.texi index 2efd7992937..89e7712b8d4 100644 --- a/gcc/doc/sourcebuild.texi +++ b/gcc/doc/sourcebuild.texi @@ -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 diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index a7e4d3e3041..be805f2f033 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2012-10-19 Greta Yorsh + + * lib/target-supports.exp (check_effective_target_arm_prefer_ldrd_strd): + New procedure. + 2012-10-19 Richard Guenther PR tree-optimization/54981 diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index 2ab630e4d5b..944143bedc0 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -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 { } {