public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH, Testsuite] Add new effective target arm_prefer_ldrd_strd
@ 2012-10-10 14:28 Greta Yorsh
  2012-10-18 18:15 ` [PING][PATCH, " Greta Yorsh
  0 siblings, 1 reply; 3+ messages in thread
From: Greta Yorsh @ 2012-10-10 14:28 UTC (permalink / raw)
  To: GCC Patches
  Cc: Ramana Radhakrishnan, Richard Earnshaw, nickc, paul, Greta Yorsh,
	mikestump, ro, janisjo

[-- Attachment #1: Type: text/plain, Size: 582 bytes --]

In the testsuite, distinguish between arm targets that prefer LDRD/STRD and
arm targets that prefer LDM/STM. This patch adds a new effective target test
and updates documentation accordingly.

Ok for trunk?

Thanks,
Greta

ChangeLog

gcc/testsuite/

2012-09-13  Greta Yorsh  <Greta.Yorsh@arm.com>

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

gcc/

2012-09-13  Greta Yorsh  <Greta.Yorsh@arm.com>

        * doc/sourcebuild.texi: Document new effective target keyword
        arm_prefer_ldrd_strd.

[-- Attachment #2: target_support_arm_prefer_ldrd_strd.patch.txt --]
[-- Type: text/plain, Size: 1406 bytes --]

diff --git a/gcc/doc/sourcebuild.texi b/gcc/doc/sourcebuild.texi
index 055567b..b80ee02 100644
--- a/gcc/doc/sourcebuild.texi
+++ b/gcc/doc/sourcebuild.texi
@@ -1552,6 +1552,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/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index 8f793b7..4bf2424 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -2462,6 +2462,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 { } {

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PING][PATCH, Testsuite] Add new effective target arm_prefer_ldrd_strd
  2012-10-10 14:28 [PATCH, Testsuite] Add new effective target arm_prefer_ldrd_strd Greta Yorsh
@ 2012-10-18 18:15 ` Greta Yorsh
  2012-10-18 21:06   ` Mike Stump
  0 siblings, 1 reply; 3+ messages in thread
From: Greta Yorsh @ 2012-10-18 18:15 UTC (permalink / raw)
  To: Greta Yorsh, GCC Patches
  Cc: Ramana Radhakrishnan, Richard Earnshaw, nickc, paul, mikestump,
	ro, janisjo

[-- Attachment #1: Type: text/plain, Size: 975 bytes --]

Ping! Thanks.

-----Original Message-----
From: Greta Yorsh [mailto:greta.yorsh@arm.com] 
Sent: 10 October 2012 15:28
To: GCC Patches
Cc: Ramana Radhakrishnan; Richard Earnshaw; nickc@redhat.com; paul@codesourcery.com; Greta Yorsh; mikestump@comcast.net; ro@CeBiTec.Uni-Bielefeld.DE; janisjo@codesourcery.com
Subject: [PATCH, Testsuite] Add new effective target arm_prefer_ldrd_strd

In the testsuite, distinguish between arm targets that prefer LDRD/STRD and
arm targets that prefer LDM/STM. This patch adds a new effective target test
and updates documentation accordingly.

Ok for trunk?

Thanks,
Greta

ChangeLog

gcc/testsuite/

2012-09-13  Greta Yorsh  <Greta.Yorsh@arm.com>

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

gcc/

2012-09-13  Greta Yorsh  <Greta.Yorsh@arm.com>

        * doc/sourcebuild.texi: Document new effective target keyword
        arm_prefer_ldrd_strd.

[-- Attachment #2: target_support_arm_prefer_ldrd_strd.patch.txt --]
[-- Type: text/plain, Size: 1404 bytes --]

diff --git a/gcc/doc/sourcebuild.texi b/gcc/doc/sourcebuild.texi
index 055567b..b80ee02 100644
--- a/gcc/doc/sourcebuild.texi
+++ b/gcc/doc/sourcebuild.texi
@@ -1552,6 +1552,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/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index 8f793b7..4bf2424 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -2462,6 +2462,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 { } {

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PING][PATCH, Testsuite] Add new effective target arm_prefer_ldrd_strd
  2012-10-18 18:15 ` [PING][PATCH, " Greta Yorsh
@ 2012-10-18 21:06   ` Mike Stump
  0 siblings, 0 replies; 3+ messages in thread
From: Mike Stump @ 2012-10-18 21:06 UTC (permalink / raw)
  To: Greta Yorsh
  Cc: GCC Patches, Ramana Radhakrishnan, Richard Earnshaw, nickc, paul,
	ro, janisjo

On Oct 18, 2012, at 10:39 AM, Greta Yorsh <Greta.Yorsh@arm.com> wrote:
> Ping! Thanks.
> 
> -----Original Message-----
> From: Greta Yorsh [mailto:greta.yorsh@arm.com] 
> Sent: 10 October 2012 15:28
> To: GCC Patches
> Cc: Ramana Radhakrishnan; Richard Earnshaw; nickc@redhat.com; paul@codesourcery.com; Greta Yorsh; mikestump@comcast.net; ro@CeBiTec.Uni-Bielefeld.DE; janisjo@codesourcery.com
> Subject: [PATCH, Testsuite] Add new effective target arm_prefer_ldrd_strd
> 
> In the testsuite, distinguish between arm targets that prefer LDRD/STRD and
> arm targets that prefer LDM/STM. This patch adds a new effective target test
> and updates documentation accordingly.
> 
> Ok for trunk?

I'd prefer arm people made the call, but 8 days is enough of a black hole, so… Ok.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-10-18 20:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-10 14:28 [PATCH, Testsuite] Add new effective target arm_prefer_ldrd_strd Greta Yorsh
2012-10-18 18:15 ` [PING][PATCH, " Greta Yorsh
2012-10-18 21:06   ` Mike Stump

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).