diff mbox

[ARM] Skip gcc.dg/torture/stackalign/builtin-apply-2.c for ARM hard-float ABI

Message ID 20120723164104.3db7aa66@octopus
State New
Headers show

Commit Message

Julian Brown July 23, 2012, 3:41 p.m. UTC
On Mon, 23 Jul 2012 14:40:59 +0100
Richard Earnshaw <rearnsha@arm.com> wrote:

> On 23/07/12 13:17, Julian Brown wrote:
> > Hi,
> > 
> > The test case gcc.dg/torture/stackalign/builtin-apply-2.c makes
> > assumptions which cannot be met for __builtin_apply for the ARM
> > hard-float ABI variant. This patch simply skips the test in that
> > case.
> > 
> > Tested (stackalign.exp only) for ARMv4t
> > -marm/-mthumb/-mfloat-abi=hard. The previously-failing test gets
> > skipped as expected with the patch. (This is another one that we've
> > had locally for a while.)
> 
> Hmm, I think this won't work for platforms like fedora/arm, where
> -mfloat-abi=hard is the default.

Yes, you're probably right. Here's a new version, which still seems to
work for my test environment. I'm not prepared to test a compiler which
has the hard-float ABI turned on by default, but I think this should
work in theory.

(I didn't find an existing check_effective_target_<foo> function
suitable for this purpose, so I had to add one.)

OK?

Julian

ChangeLog

    gcc/testsuite/
    * lib/target-supports.exp (check_effective_target_arm_hf_eabi): New.
    * gcc.dg/torture/stackalign/builtin-apply-2.c: Skip for
    hard-float ARM.

Comments

Ramana Radhakrishnan July 23, 2012, 4:41 p.m. UTC | #1
On 23 July 2012 16:41, Julian Brown <julian@codesourcery.com> wrote:
> On Mon, 23 Jul 2012 14:40:59 +0100
> Richard Earnshaw <rearnsha@arm.com> wrote:
>
>> On 23/07/12 13:17, Julian Brown wrote:
>> > Hi,
>> >
>> > The test case gcc.dg/torture/stackalign/builtin-apply-2.c makes
>> > assumptions which cannot be met for __builtin_apply for the ARM
>> > hard-float ABI variant. This patch simply skips the test in that
>> > case.
>> >
>> > Tested (stackalign.exp only) for ARMv4t
>> > -marm/-mthumb/-mfloat-abi=hard. The previously-failing test gets
>> > skipped as expected with the patch. (This is another one that we've
>> > had locally for a while.)
>>
>> Hmm, I think this won't work for platforms like fedora/arm, where
>> -mfloat-abi=hard is the default.
>
> Yes, you're probably right. Here's a new version, which still seems to
> work for my test environment. I'm not prepared to test a compiler which
> has the hard-float ABI turned on by default, but I think this should
> work in theory.
>
> (I didn't find an existing check_effective_target_<foo> function
> suitable for this purpose, so I had to add one.)

Unfortunately arm_hard_vfp_ok doesn't serve this purpose. This should
be documented in doc/sourcebuild.texi.( I will note that a number of
new effective_targets for the ARM port haven't made it in there but
that's a subject for a future patch but it would be better if we got
this one right :) )

Ok with appropriate documentation to sourcebuild.texi and checking
that the documentation builds fine.

regards,
Ramana

>
> OK?
>
> Julian
>
> ChangeLog
>
>     gcc/testsuite/
>     * lib/target-supports.exp (check_effective_target_arm_hf_eabi): New.
>     * gcc.dg/torture/stackalign/builtin-apply-2.c: Skip for
>     hard-float ARM.
diff mbox

Patch

Index: gcc/testsuite/lib/target-supports.exp
===================================================================
--- gcc/testsuite/lib/target-supports.exp	(revision 189786)
+++ gcc/testsuite/lib/target-supports.exp	(working copy)
@@ -2341,6 +2341,19 @@  proc check_effective_target_arm_eabi { }
     }]
 }
 
+# Return 1 if this is an ARM target that adheres to the hard-float variant of
+# the ABI for the ARM Architecture (e.g. -mfloat-abi=hard).
+
+proc check_effective_target_arm_hf_eabi { } {
+    return [check_no_compiler_messages arm_hf_eabi object {
+	#if !defined(__ARM_EABI__) || !defined(__ARM_PCS_VFP)
+	#error not hard-float EABI
+	#else
+	int dummy;
+	#endif
+    }]
+}
+
 # Return 1 if this is an ARM target supporting -mcpu=iwmmxt.
 # Some multilibs may be incompatible with this option.
 
Index: gcc/testsuite/gcc.dg/torture/stackalign/builtin-apply-2.c
===================================================================
--- gcc/testsuite/gcc.dg/torture/stackalign/builtin-apply-2.c	(revision 189786)
+++ gcc/testsuite/gcc.dg/torture/stackalign/builtin-apply-2.c	(working copy)
@@ -5,6 +5,8 @@ 
    with pre-pushed arguments (e.g. SPARC).  */
 
 /* { dg-do run } */
+
+/* { dg-skip-if "Variadic funcs use Base AAPCS.  Normal funcs use VFP variant." { arm_hf_eabi } } */
    
 
 #define INTEGER_ARG  5