Patchwork [ARM] New ARM VFP test cases

login
register
mail settings
Submitter Andrew Stubbs
Date Feb. 2, 2011, 3:55 p.m.
Message ID <4D497E54.3040803@codesourcery.com>
Download mbox | patch
Permalink /patch/81469/
State New
Headers show

Comments

Andrew Stubbs - Feb. 2, 2011, 3:55 p.m.
I'm posting these new (ok, rather old) testcases on behalf of Kazu.

I've tested that they pass ok, with both thumb and arm mode.

OK to commit?

Andrew
Ramana Radhakrishnan - Feb. 27, 2011, 11:49 p.m.
On 02/02/2011 15:55, Andrew Stubbs wrote:
> I'm posting these new (ok, rather old) testcases on behalf of Kazu.
>
> I've tested that they pass ok, with both thumb and arm mode.
>
> OK to commit?

OK.

Ramana
Andrew Stubbs - Feb. 28, 2011, 11:44 a.m.
On 27/02/11 23:49, Ramana Radhakrishnan wrote:
> On 02/02/2011 15:55, Andrew Stubbs wrote:
>> I'm posting these new (ok, rather old) testcases on behalf of Kazu.
>>
>> I've tested that they pass ok, with both thumb and arm mode.
>>
>> OK to commit?
>
> OK.

Committed, thanks.

Andrew

Patch

2006-04-21  Kazu Hirata  <kazu@codesourcery.com>

	gcc/testsuite/
	* gcc.target/arm/vfp-ldmdbd.c, gcc.target/arm/vfp-ldmdbs.c,
	gcc.target/arm/vfp-ldmiad.c, gcc.target/arm/vfp-ldmias.c,
	gcc.target/arm/vfp-stmdbd.c, gcc.target/arm/vfp-stmdbs.c,
	gcc.target/arm/vfp-stmiad.c, gcc.target/arm/vfp-stmias.c: New.

--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/vfp-ldmdbd.c
@@ -0,0 +1,15 @@ 
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_vfp_ok } */
+/* { dg-options "-O2 -mfpu=vfp -mfloat-abi=softfp" } */
+
+extern void bar (double);
+
+void
+foo (double *p, double a, int n)
+{
+  do
+    bar (*--p + a);
+  while (n--);
+}
+
+/* { dg-final { scan-assembler "fldmdbd" } } */
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/vfp-ldmdbs.c
@@ -0,0 +1,15 @@ 
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_vfp_ok } */
+/* { dg-options "-O2 -mfpu=vfp -mfloat-abi=softfp" } */
+
+extern void baz (float);
+
+void
+foo (float *p, float a, int n)
+{
+  do
+    bar (*--p + a);
+  while (n--);
+}
+
+/* { dg-final { scan-assembler "fldmdbs" } } */
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/vfp-ldmiad.c
@@ -0,0 +1,15 @@ 
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_vfp_ok } */
+/* { dg-options "-O2 -mfpu=vfp -mfloat-abi=softfp" } */
+
+extern void bar (double);
+
+void
+foo (double *p, double a, int n)
+{
+  do
+    bar (*p++ + a);
+  while (n--);
+}
+
+/* { dg-final { scan-assembler "fldmiad" } } */
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/vfp-ldmias.c
@@ -0,0 +1,15 @@ 
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_vfp_ok } */
+/* { dg-options "-O2 -mfpu=vfp -mfloat-abi=softfp" } */
+
+extern void baz (float);
+
+void
+foo (float *p, float a, int n)
+{
+  do
+    bar (*p++ + a);
+  while (n--);
+}
+
+/* { dg-final { scan-assembler "fldmias" } } */
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/vfp-stmdbd.c
@@ -0,0 +1,14 @@ 
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_vfp_ok } */
+/* { dg-options "-O2 -mfpu=vfp -mfloat-abi=softfp" } */
+
+void
+foo (double *p, double a, double b, int n)
+{
+  double c = a + b;
+  do
+    *--p = c;
+  while (n--);
+}
+
+/* { dg-final { scan-assembler "fstmdbd" } } */
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/vfp-stmdbs.c
@@ -0,0 +1,14 @@ 
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_vfp_ok } */
+/* { dg-options "-O2 -mfpu=vfp -mfloat-abi=softfp" } */
+
+void
+foo (float *p, float a, float b, int n)
+{
+  float c = a + b;
+  do
+    *--p = c;
+  while (n--);
+}
+
+/* { dg-final { scan-assembler "fstmdbs" } } */
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/vfp-stmiad.c
@@ -0,0 +1,14 @@ 
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_vfp_ok } */
+/* { dg-options "-O2 -mfpu=vfp -mfloat-abi=softfp" } */
+
+void
+foo (double *p, double a, double b, int n)
+{
+  double c = a + b;
+  do
+    *p++ = c;
+  while (n--);
+}
+
+/* { dg-final { scan-assembler "fstmiad" } } */
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/vfp-stmias.c
@@ -0,0 +1,14 @@ 
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_vfp_ok } */
+/* { dg-options "-O2 -mfpu=vfp -mfloat-abi=softfp" } */
+
+void
+foo (float *p, float a, float b, int n)
+{
+  float c = a + b;
+  do
+    *p++ = c;
+  while (n--);
+}
+
+/* { dg-final { scan-assembler "fstmias" } } */