* gcc.target/arm/abitest.h: Allow the test function to have a PCS
authorrearnsha <rearnsha@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 6 Aug 2009 18:15:19 +0000 (18:15 +0000)
committerrearnsha <rearnsha@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 6 Aug 2009 18:15:19 +0000 (18:15 +0000)
attribute.
* gcc.target/arm/vfp1[567].c: New tests.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@150536 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/arm/aapcs/abitest.h
gcc/testsuite/gcc.target/arm/aapcs/vfp15.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/aapcs/vfp16.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/aapcs/vfp17.c [new file with mode: 0644]

index b17d348..0dc1b9d 100644 (file)
@@ -1,9 +1,15 @@
-2009-08-05  Jason Merrill  <jason@redhat.com>
+2009-08-06  Richard Earnshaw  <rearnsha@arm.com>
+
+       * 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  <jason@redhat.com>
 
        PR c++/40948
        * g++.dg/ext/complit12.C: Expand.
 
-2009-08-05  Richard Earnshaw  <rearnsha@arm.com>
+2009-08-06  Richard Earnshaw  <rearnsha@arm.com>
 
        Merge ARM/hard_vfp_branch to trunk.
 
index f6474a9..7b7d0e2 100644 (file)
@@ -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 (file)
index 0000000..d5a75b5
--- /dev/null
@@ -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 (file)
index 0000000..9815994
--- /dev/null
@@ -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 (file)
index 0000000..d02160c
--- /dev/null
@@ -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