aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Earnshaw <rearnsha@gcc.gnu.org>2009-08-06 18:15:19 +0000
committerRichard Earnshaw <rearnsha@gcc.gnu.org>2009-08-06 18:15:19 +0000
commitde2aa20e758bdc2b520855b9a4dc1b344fb51b18 (patch)
tree2b35799259ef89f70a7bd4870daca506c1aee8d1 /gcc
parentca9fe9972e1a755970766a821631c8c303d9f63f (diff)
downloadgcc-de2aa20e758bdc2b520855b9a4dc1b344fb51b18.zip
gcc-de2aa20e758bdc2b520855b9a4dc1b344fb51b18.tar.gz
gcc-de2aa20e758bdc2b520855b9a4dc1b344fb51b18.tar.bz2
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog10
-rw-r--r--gcc/testsuite/gcc.target/arm/aapcs/abitest.h6
-rw-r--r--gcc/testsuite/gcc.target/arm/aapcs/vfp15.c20
-rw-r--r--gcc/testsuite/gcc.target/arm/aapcs/vfp16.c22
-rw-r--r--gcc/testsuite/gcc.target/arm/aapcs/vfp17.c20
5 files changed, 75 insertions, 3 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index b17d348..0dc1b9d 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -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.
diff --git a/gcc/testsuite/gcc.target/arm/aapcs/abitest.h b/gcc/testsuite/gcc.target/arm/aapcs/abitest.h
index f6474a98..7b7d0e2 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 0000000..d5a75b5
--- /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 0000000..9815994
--- /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 0000000..d02160c
--- /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