From: Richard Earnshaw Date: Thu, 6 Aug 2009 18:15:19 +0000 (+0000) Subject: abitest.h: Allow the test function to have a PCS attribute. X-Git-Tag: releases/gcc-4.5.0~4151 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=de2aa20e758bdc2b520855b9a4dc1b344fb51b18;p=thirdparty%2Fgcc.git abitest.h: Allow the test function to have a PCS attribute. * gcc.target/arm/abitest.h: Allow the test function to have a PCS attribute. * gcc.target/arm/vfp1[567].c: New tests. From-SVN: r150536 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index b17d3484fdd4..0dc1b9dc5439 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,9 +1,15 @@ -2009-08-05 Jason Merrill +2009-08-06 Richard Earnshaw + + * gcc.target/arm/abitest.h: Allow the test function to have a PCS + attribute. + * gcc.target/arm/vfp1[567].c: New tests. + +2009-08-06 Jason Merrill PR c++/40948 * g++.dg/ext/complit12.C: Expand. -2009-08-05 Richard Earnshaw +2009-08-06 Richard Earnshaw Merge ARM/hard_vfp_branch to trunk. diff --git a/gcc/testsuite/gcc.target/arm/aapcs/abitest.h b/gcc/testsuite/gcc.target/arm/aapcs/abitest.h index f6474a988a09..7b7d0e24fac0 100644 --- a/gcc/testsuite/gcc.target/arm/aapcs/abitest.h +++ b/gcc/testsuite/gcc.target/arm/aapcs/abitest.h @@ -93,9 +93,13 @@ void testfunc(char* stack) #define MYFUNCTYPE void #endif +#ifndef PCSATTR +#define PCSATTR +#endif + MYFUNCTYPE myfunc( #include TESTFILE -); +) PCSATTR; #undef LAST_ARG #undef ARG diff --git a/gcc/testsuite/gcc.target/arm/aapcs/vfp15.c b/gcc/testsuite/gcc.target/arm/aapcs/vfp15.c new file mode 100644 index 000000000000..d5a75b5b8ffa --- /dev/null +++ b/gcc/testsuite/gcc.target/arm/aapcs/vfp15.c @@ -0,0 +1,20 @@ +/* Test AAPCS layout (VFP variant) */ + +/* { dg-do run { target arm*-*-eabi* } } */ +/* { dg-require-effective-target arm_hard_vfp_ok } */ +/* { dg-require-effective-target arm32 } */ +/* { dg-options "-O -mfpu=vfp -mfloat-abi=hard" } */ + +#ifndef IN_FRAMEWORK +#define VFP +#define TESTFILE "vfp15.c" + +#define PCSATTR __attribute__((pcs("aapcs"))) + +#include "abitest.h" +#else + ARG(double, 1.0, R0) + ARG(double, 2.0, R2) + ARG(double, 3.0, STACK) + LAST_ARG(double, 4.0, STACK+8) +#endif diff --git a/gcc/testsuite/gcc.target/arm/aapcs/vfp16.c b/gcc/testsuite/gcc.target/arm/aapcs/vfp16.c new file mode 100644 index 000000000000..9815994ef8b7 --- /dev/null +++ b/gcc/testsuite/gcc.target/arm/aapcs/vfp16.c @@ -0,0 +1,22 @@ +/* Test AAPCS layout (VFP variant) */ + +/* { dg-do run { target arm*-*-eabi* } } */ +/* { dg-require-effective-target arm_hard_vfp_ok } */ +/* { dg-require-effective-target arm32 } */ +/* { dg-options "-O -mfpu=vfp -mfloat-abi=hard" } */ + +#ifndef IN_FRAMEWORK +#define VFP +#define TESTFILE "vfp16.c" + +#define PCSATTR __attribute__((pcs("aapcs"))) + +#include "abitest.h" +#else + ARG(float, 1.0f, R0) + ARG(float, 2.0f, R1) + ARG(float, 3.0f, R2) + ARG(float, 4.0f, R3) + ARG(float, 5.0f, STACK) + LAST_ARG(float, 5.0f, STACK+4) +#endif diff --git a/gcc/testsuite/gcc.target/arm/aapcs/vfp17.c b/gcc/testsuite/gcc.target/arm/aapcs/vfp17.c new file mode 100644 index 000000000000..d02160c860b8 --- /dev/null +++ b/gcc/testsuite/gcc.target/arm/aapcs/vfp17.c @@ -0,0 +1,20 @@ +/* Test AAPCS layout (VFP variant) */ + +/* { dg-do run { target arm*-*-eabi* } } */ +/* { dg-require-effective-target arm_hard_vfp_ok } */ +/* { dg-require-effective-target arm32 } */ +/* { dg-options "-O -mfpu=vfp -mfloat-abi=hard" } */ + +#ifndef IN_FRAMEWORK +#define VFP +#define TESTFILE "vfp17.c" + +#define PCSATTR __attribute__((pcs("aapcs"))) + +#include "abitest.h" +#else + ARG(float, 1.0f, R0) + ARG(double, 2.0, R2) + ARG(float, 3.0f, STACK) + LAST_ARG(double, 4.0, STACK+8) +#endif