summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/arm
diff options
context:
space:
mode:
authorrearnsha <rearnsha@138bc75d-0d04-0410-961f-82ee72b054a4>2009-08-06 18:15:19 +0000
committerrearnsha <rearnsha@138bc75d-0d04-0410-961f-82ee72b054a4>2009-08-06 18:15:19 +0000
commit13e93a4b7bca6d0871977d0dc6e9f9e5532f1fb7 (patch)
tree2b35799259ef89f70a7bd4870daca506c1aee8d1 /gcc/testsuite/gcc.target/arm
parentba2b484f6d3a12e493e3fee496ff551925abbffc (diff)
downloadgcc-13e93a4b7bca6d0871977d0dc6e9f9e5532f1fb7.tar.gz
* gcc.target/arm/abitest.h: Allow the test function to have a PCS
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
Diffstat (limited to 'gcc/testsuite/gcc.target/arm')
-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
4 files changed, 67 insertions, 1 deletions
diff --git a/gcc/testsuite/gcc.target/arm/aapcs/abitest.h b/gcc/testsuite/gcc.target/arm/aapcs/abitest.h
index f6474a988a0..7b7d0e24fac 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 00000000000..d5a75b5b8ff
--- /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 00000000000..9815994ef8b
--- /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 00000000000..d02160c860b
--- /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