public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] [PATCH][ARM] Fix sibcall testcases.
@ 2015-05-20 18:26 Alex Velenko
  2015-05-20 20:21 ` Joseph Myers
  0 siblings, 1 reply; 4+ messages in thread
From: Alex Velenko @ 2015-05-20 18:26 UTC (permalink / raw)
  To: gcc-patches; +Cc: ramana.radhakrishnan

Hi,

This patch prevents arm_thumb1_ok XPASS in sibcall-3.c and sibcall-4.c
testcases. Sibcalls are not ok for Thumb1 and testcases need to be fixed.

Is patch ok?

gcc/testsuite

2015-05-20  Alex Velenko  <Alex.Velenko@arm.com>

        * gcc.dg/sibcall-3.c (dg-skip-if): Skip if arm_thumb1_ok.
        * gcc.dg/sibcall-4.c (dg-skip-if): Likewise.
---
 gcc/testsuite/gcc.dg/sibcall-3.c | 1 +
 gcc/testsuite/gcc.dg/sibcall-4.c | 1 +
 2 files changed, 2 insertions(+)

diff --git a/gcc/testsuite/gcc.dg/sibcall-3.c b/gcc/testsuite/gcc.dg/sibcall-3.c
index eafe8dd..37f44a1 100644
--- a/gcc/testsuite/gcc.dg/sibcall-3.c
+++ b/gcc/testsuite/gcc.dg/sibcall-3.c
@@ -8,6 +8,7 @@
 /* { dg-do run { xfail { { cris-*-* crisv32-*-* h8300-*-* hppa*64*-*-* m32r-*-* mcore-*-* mn10300-*-* msp430*-*-* nds32*-*-* xstormy16-*-* v850*-*-* vax-*-* xtensa*-*-* } || { arm*-*-* && { ! arm32 } } } } } */
 /* -mlongcall disables sibcall patterns.  */
 /* { dg-skip-if "" { powerpc*-*-* } { "-mlongcall" } { "" } } */
+/* { dg-skip-if "" { arm*-*-* && arm_thumb1_ok } } */
 /* { dg-options "-O2 -foptimize-sibling-calls" } */
 
 /* The option -foptimize-sibling-calls is the default, but serves as
diff --git a/gcc/testsuite/gcc.dg/sibcall-4.c b/gcc/testsuite/gcc.dg/sibcall-4.c
index 1e039c6..9554a95 100644
--- a/gcc/testsuite/gcc.dg/sibcall-4.c
+++ b/gcc/testsuite/gcc.dg/sibcall-4.c
@@ -8,6 +8,7 @@
 /* { dg-do run { xfail { { cris-*-* crisv32-*-* h8300-*-* hppa*64*-*-* m32r-*-* mcore-*-* mn10300-*-* msp430*-*-* nds32*-*-* xstormy16-*-* v850*-*-* vax-*-* xtensa*-*-* } || { arm*-*-* && { ! arm32 } } } } } */
 /* -mlongcall disables sibcall patterns.  */
 /* { dg-skip-if "" { powerpc*-*-* } { "-mlongcall" } { "" } } */
+/* { dg-skip-if "" { arm*-*-* && arm_thumb1_ok } } */
 /* { dg-options "-O2 -foptimize-sibling-calls" } */
 
 /* The option -foptimize-sibling-calls is the default, but serves as
-- 
1.8.1.2

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

* Re: [PATCH] [PATCH][ARM] Fix sibcall testcases.
  2015-05-20 18:26 [PATCH] [PATCH][ARM] Fix sibcall testcases Alex Velenko
@ 2015-05-20 20:21 ` Joseph Myers
  2015-05-21  9:09   ` Ramana Radhakrishnan
  0 siblings, 1 reply; 4+ messages in thread
From: Joseph Myers @ 2015-05-20 20:21 UTC (permalink / raw)
  To: Alex Velenko; +Cc: gcc-patches, ramana.radhakrishnan

On Wed, 20 May 2015, Alex Velenko wrote:

> Hi,
> 
> This patch prevents arm_thumb1_ok XPASS in sibcall-3.c and sibcall-4.c
> testcases. Sibcalls are not ok for Thumb1 and testcases need to be fixed.

arm_thumb1_ok means "this is an ARM target where -mthumb causes Thumb-1 to 
be used".  It only ever makes sense to use it in tests that use an 
explicit -mthumb, which these tests don't.

If you want to check "is this test being built for Thumb-1 by the multilib 
options", use arm_thumb1.

-- 
Joseph S. Myers
joseph@codesourcery.com

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

* Re: [PATCH] [PATCH][ARM] Fix sibcall testcases.
  2015-05-20 20:21 ` Joseph Myers
@ 2015-05-21  9:09   ` Ramana Radhakrishnan
  2015-07-28 18:13     ` Alex Velenko
  0 siblings, 1 reply; 4+ messages in thread
From: Ramana Radhakrishnan @ 2015-05-21  9:09 UTC (permalink / raw)
  To: Joseph Myers; +Cc: Alex Velenko, gcc-patches, Ramana Radhakrishnan

On Wed, May 20, 2015 at 9:11 PM, Joseph Myers <joseph@codesourcery.com> wrote:
> On Wed, 20 May 2015, Alex Velenko wrote:
>
>> Hi,
>>
>> This patch prevents arm_thumb1_ok XPASS in sibcall-3.c and sibcall-4.c
>> testcases. Sibcalls are not ok for Thumb1 and testcases need to be fixed.
>
> arm_thumb1_ok means "this is an ARM target where -mthumb causes Thumb-1 to
> be used".  It only ever makes sense to use it in tests that use an
> explicit -mthumb, which these tests don't.
>
> If you want to check "is this test being built for Thumb-1 by the multilib
> options", use arm_thumb1.
>

Alex, so while you are here - why don't you improve the documentation
in sourcebuild.texi by

1. documenting arm_thumb1
2. distinguishing that from arm_thumb1_ok which just says
`ARM target generates Thumb-1 code for @code{-mthumb}.'

and that is just meaningless.

regards
Ramana



> --
> Joseph S. Myers
> joseph@codesourcery.com

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

* Re: Re: [PATCH] [PATCH][ARM] Fix sibcall testcases.
  2015-05-21  9:09   ` Ramana Radhakrishnan
@ 2015-07-28 18:13     ` Alex Velenko
  0 siblings, 0 replies; 4+ messages in thread
From: Alex Velenko @ 2015-07-28 18:13 UTC (permalink / raw)
  To: ramrad01, Joseph Myers; +Cc: gcc-patches, Ramana Radhakrishnan

Hi,

Following last patch, this patch patch prevents arm_thumb1 XPASS in
sibcall-3.c and sibcall-4.c by skipping on arm_thumb1 and arm_thumb2
respectively.
This patch also documents arm_thumb1 and arm_thumb2 effective target 
options.

Is patch ok for trunk and fsf-5?

gcc/testsuite

2015-07-28  Alex Velenko  <Alex.Velenko@arm.com>

         * gcc.dg/sibcall-3.c (dg-skip-if): Skip if arm_thumb1.
         * gcc.dg/sibcall-4.c (dg-skip-if): Likewise.

gcc/

2015-07-28  Alex Velenko  <Alex.Velenko@arm.com>

         * doc/sourcebuild.texi (arm_thumb1): Documented.
         (arm-thumb2): Likewise.
---
  gcc/doc/sourcebuild.texi         | 8 ++++++++
  gcc/testsuite/gcc.dg/sibcall-3.c | 1 +
  gcc/testsuite/gcc.dg/sibcall-4.c | 1 +
  3 files changed, 10 insertions(+)

diff --git a/gcc/doc/sourcebuild.texi b/gcc/doc/sourcebuild.texi
index c6ef40e..ca42a09 100644
--- a/gcc/doc/sourcebuild.texi
+++ b/gcc/doc/sourcebuild.texi
@@ -1551,6 +1551,14 @@ options.  Some multilibs may be incompatible with 
these options.
  ARM Target supports @code{-mfpu=neon-fp16 -mfloat-abi=softfp} or 
compatible
  options.  Some multilibs may be incompatible with these options.

+@item arm_thumb1
+ARM target interworks with Thumb-1 - given @code{-mthumb-interwork} 
both ARM and
+Thumb code may be generated interleaved.
+
+@item arm_thumb2
+ARM target interworks with Thumb-2 - given @code{-mthumb-interwork} 
both ARM and
+Thumb code may be generated interleaved.
+
  @item arm_thumb1_ok
  ARM target generates Thumb-1 code for @code{-mthumb}.

diff --git a/gcc/testsuite/gcc.dg/sibcall-3.c 
b/gcc/testsuite/gcc.dg/sibcall-3.c
index eafe8dd..e44596e 100644
--- a/gcc/testsuite/gcc.dg/sibcall-3.c
+++ b/gcc/testsuite/gcc.dg/sibcall-3.c
@@ -8,6 +8,7 @@
  /* { dg-do run { xfail { { cris-*-* crisv32-*-* h8300-*-* hppa*64*-*-* 
m32r-*-* mcore-*-* mn10300-*-* msp430*-*-* nds32*-*-* xstormy16-*-* 
v850*-*-* vax-*-* xtensa*-*-* } || { arm*-*-* && { ! arm32 } } } } } */
  /* -mlongcall disables sibcall patterns.  */
  /* { dg-skip-if "" { powerpc*-*-* } { "-mlongcall" } { "" } } */
+/* { dg-skip-if "" { arm_thumb1 } } */
  /* { dg-options "-O2 -foptimize-sibling-calls" } */

  /* The option -foptimize-sibling-calls is the default, but serves as
diff --git a/gcc/testsuite/gcc.dg/sibcall-4.c 
b/gcc/testsuite/gcc.dg/sibcall-4.c
index 1e039c6..5c69490 100644
--- a/gcc/testsuite/gcc.dg/sibcall-4.c
+++ b/gcc/testsuite/gcc.dg/sibcall-4.c
@@ -8,6 +8,7 @@
  /* { dg-do run { xfail { { cris-*-* crisv32-*-* h8300-*-* hppa*64*-*-* 
m32r-*-* mcore-*-* mn10300-*-* msp430*-*-* nds32*-*-* xstormy16-*-* 
v850*-*-* vax-*-* xtensa*-*-* } || { arm*-*-* && { ! arm32 } } } } } */
  /* -mlongcall disables sibcall patterns.  */
  /* { dg-skip-if "" { powerpc*-*-* } { "-mlongcall" } { "" } } */
+/* { dg-skip-if "" { arm_thumb1 } } */
  /* { dg-options "-O2 -foptimize-sibling-calls" } */

  /* The option -foptimize-sibling-calls is the default, but serves as
-- 
1.8.1.2

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

end of thread, other threads:[~2015-07-28 17:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-20 18:26 [PATCH] [PATCH][ARM] Fix sibcall testcases Alex Velenko
2015-05-20 20:21 ` Joseph Myers
2015-05-21  9:09   ` Ramana Radhakrishnan
2015-07-28 18:13     ` Alex Velenko

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).