summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target
diff options
context:
space:
mode:
authormeissner <meissner@138bc75d-0d04-0410-961f-82ee72b054a4>2013-11-22 17:24:32 +0000
committermeissner <meissner@138bc75d-0d04-0410-961f-82ee72b054a4>2013-11-22 17:24:32 +0000
commit6406c3555bffdef3ccd6f95ffb37dde849d12b48 (patch)
tree1c7c37213eaf3dc6a8afb834c94eda9a56ec5174 /gcc/testsuite/gcc.target
parente7297f3c52428b3af33d27a3da5fa6bc75250246 (diff)
downloadgcc-6406c3555bffdef3ccd6f95ffb37dde849d12b48.tar.gz
2013-11-22 Michael Meissner <meissner@linux.vnet.ibm.com>
PR target/59054 * gcc.target/powerpc/direct-move.h (VSX_REG_ATTR): Allow test to specify an appropriate register class for VSX operations. (load_vsx): Use it. (load_gpr_to_vsx): Likewise. (load_vsx_to_gpr): Likewise. * gcc.target/powerpc/direct-move-vint1.c: Use an appropriate register class for VSX registers that the type can handle. Remove checks for explicit number of instructions generated, just check if the instruction is generated. * gcc.target/powerpc/direct-move-vint2.c: Likewise. * gcc.target/powerpc/direct-move-float1.c: Likewise. * gcc.target/powerpc/direct-move-float2.c: Likewise. * gcc.target/powerpc/direct-move-double1.c: Likewise. * gcc.target/powerpc/direct-move-double2.c: Likewise. * gcc.target/powerpc/direct-move-long1.c: Likewise. * gcc.target/powerpc/direct-move-long2.c: Likewise. * gcc.target/powerpc/pr59054.c: Remove duplicate code. * gcc.target/powerpc/bool3-av.c: Limit to 64-bit mode for now. * gcc.target/powerpc/bool3-p7.c: Likewise. * gcc.target/powerpc/bool3-p8.c: Likewise. * gcc.target/powerpc/p8vector-ldst.c: Just check that the appropriate instructions are generated, don't check the count. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@205278 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.target')
-rw-r--r--gcc/testsuite/gcc.target/powerpc/bool3-av.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/bool3-p7.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/bool3-p8.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/direct-move-double1.c7
-rw-r--r--gcc/testsuite/gcc.target/powerpc/direct-move-double2.c1
-rw-r--r--gcc/testsuite/gcc.target/powerpc/direct-move-float1.c11
-rw-r--r--gcc/testsuite/gcc.target/powerpc/direct-move-float2.c1
-rw-r--r--gcc/testsuite/gcc.target/powerpc/direct-move-long1.c5
-rw-r--r--gcc/testsuite/gcc.target/powerpc/direct-move-long2.c1
-rw-r--r--gcc/testsuite/gcc.target/powerpc/direct-move-vint1.c7
-rw-r--r--gcc/testsuite/gcc.target/powerpc/direct-move-vint2.c1
-rw-r--r--gcc/testsuite/gcc.target/powerpc/direct-move.h10
-rw-r--r--gcc/testsuite/gcc.target/powerpc/p8vector-ldst.c8
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pr59054.c12
14 files changed, 35 insertions, 35 deletions
diff --git a/gcc/testsuite/gcc.target/powerpc/bool3-av.c b/gcc/testsuite/gcc.target/powerpc/bool3-av.c
index 4ef82c8cd97..d4aac786b2c 100644
--- a/gcc/testsuite/gcc.target/powerpc/bool3-av.c
+++ b/gcc/testsuite/gcc.target/powerpc/bool3-av.c
@@ -1,4 +1,4 @@
-/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-do compile { target { powerpc*-*-* && lp64 } } } */
/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
/* { dg-require-effective-target powerpc_altivec_ok } */
/* { dg-options "-O2 -mcpu=power6 -mabi=altivec -maltivec -mno-vsx" } */
diff --git a/gcc/testsuite/gcc.target/powerpc/bool3-p7.c b/gcc/testsuite/gcc.target/powerpc/bool3-p7.c
index a077ba5aea7..34e3c9e79dd 100644
--- a/gcc/testsuite/gcc.target/powerpc/bool3-p7.c
+++ b/gcc/testsuite/gcc.target/powerpc/bool3-p7.c
@@ -1,4 +1,4 @@
-/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-do compile { target { powerpc*-*-* && lp64 } } } */
/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
/* { dg-require-effective-target powerpc_vsx_ok } */
/* { dg-options "-O2 -mcpu=power7" } */
diff --git a/gcc/testsuite/gcc.target/powerpc/bool3-p8.c b/gcc/testsuite/gcc.target/powerpc/bool3-p8.c
index 361a0452d7d..e1b2dfa7ee2 100644
--- a/gcc/testsuite/gcc.target/powerpc/bool3-p8.c
+++ b/gcc/testsuite/gcc.target/powerpc/bool3-p8.c
@@ -1,4 +1,4 @@
-/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-do compile { target { powerpc*-*-* && lp64 } } } */
/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
/* { dg-require-effective-target powerpc_p8vector_ok } */
/* { dg-options "-O2 -mcpu=power8" } */
diff --git a/gcc/testsuite/gcc.target/powerpc/direct-move-double1.c b/gcc/testsuite/gcc.target/powerpc/direct-move-double1.c
index 534a04a937b..2569ac84369 100644
--- a/gcc/testsuite/gcc.target/powerpc/direct-move-double1.c
+++ b/gcc/testsuite/gcc.target/powerpc/direct-move-double1.c
@@ -3,13 +3,14 @@
/* { dg-skip-if "" { powerpc*-*-*spe* } { "*" } { "" } } */
/* { dg-require-effective-target powerpc_p8vector_ok } */
/* { dg-options "-mcpu=power8 -O2" } */
-/* { dg-final { scan-assembler-times "mtvsrd" 1 } } */
-/* { dg-final { scan-assembler-times "mfvsrd" 1 } } */
+/* { dg-final { scan-assembler "mtvsrd" } } */
+/* { dg-final { scan-assembler "mfvsrd" } } */
-/* Check code generation for direct move for long types. */
+/* Check code generation for direct move for double types. */
#define TYPE double
#define IS_FLOAT 1
#define NO_ALTIVEC 1
+#define VSX_REG_ATTR "ws"
#include "direct-move.h"
diff --git a/gcc/testsuite/gcc.target/powerpc/direct-move-double2.c b/gcc/testsuite/gcc.target/powerpc/direct-move-double2.c
index 750debfc0df..c8702204b70 100644
--- a/gcc/testsuite/gcc.target/powerpc/direct-move-double2.c
+++ b/gcc/testsuite/gcc.target/powerpc/direct-move-double2.c
@@ -10,5 +10,6 @@
#define IS_FLOAT 1
#define NO_ALTIVEC 1
#define DO_MAIN
+#define VSX_REG_ATTR "ws"
#include "direct-move.h"
diff --git a/gcc/testsuite/gcc.target/powerpc/direct-move-float1.c b/gcc/testsuite/gcc.target/powerpc/direct-move-float1.c
index ff1e97c0d43..524c0eead43 100644
--- a/gcc/testsuite/gcc.target/powerpc/direct-move-float1.c
+++ b/gcc/testsuite/gcc.target/powerpc/direct-move-float1.c
@@ -3,15 +3,16 @@
/* { dg-skip-if "" { powerpc*-*-*spe* } { "*" } { "" } } */
/* { dg-require-effective-target powerpc_p8vector_ok } */
/* { dg-options "-mcpu=power8 -O2" } */
-/* { dg-final { scan-assembler-times "mtvsrd" 2 } } */
-/* { dg-final { scan-assembler-times "mfvsrd" 2 } } */
-/* { dg-final { scan-assembler-times "xscvdpspn" 2 } } */
-/* { dg-final { scan-assembler-times "xscvspdpn" 2 } } */
+/* { dg-final { scan-assembler "mtvsrd" } } */
+/* { dg-final { scan-assembler "mfvsrd" } } */
+/* { dg-final { scan-assembler "xscvdpspn" } } */
+/* { dg-final { scan-assembler "xscvspdpn" } } */
-/* Check code generation for direct move for long types. */
+/* Check code generation for direct move for float types. */
#define TYPE float
#define IS_FLOAT 1
#define NO_ALTIVEC 1
+#define VSX_REG_ATTR "ww"
#include "direct-move.h"
diff --git a/gcc/testsuite/gcc.target/powerpc/direct-move-float2.c b/gcc/testsuite/gcc.target/powerpc/direct-move-float2.c
index ace728ff6d4..352e76166d0 100644
--- a/gcc/testsuite/gcc.target/powerpc/direct-move-float2.c
+++ b/gcc/testsuite/gcc.target/powerpc/direct-move-float2.c
@@ -10,5 +10,6 @@
#define IS_FLOAT 1
#define NO_ALTIVEC 1
#define DO_MAIN
+#define VSX_REG_ATTR "ww"
#include "direct-move.h"
diff --git a/gcc/testsuite/gcc.target/powerpc/direct-move-long1.c b/gcc/testsuite/gcc.target/powerpc/direct-move-long1.c
index 907e802c72b..0a78f9cb258 100644
--- a/gcc/testsuite/gcc.target/powerpc/direct-move-long1.c
+++ b/gcc/testsuite/gcc.target/powerpc/direct-move-long1.c
@@ -3,13 +3,14 @@
/* { dg-skip-if "" { powerpc*-*-*spe* } { "*" } { "" } } */
/* { dg-require-effective-target powerpc_p8vector_ok } */
/* { dg-options "-mcpu=power8 -O2" } */
-/* { dg-final { scan-assembler-times "mtvsrd" 1 } } */
-/* { dg-final { scan-assembler-times "mfvsrd" 2 } } */
+/* { dg-final { scan-assembler "mtvsrd" } } */
+/* { dg-final { scan-assembler "mfvsrd" } } */
/* Check code generation for direct move for long types. */
#define TYPE long
#define IS_INT 1
#define NO_ALTIVEC 1
+#define VSX_REG_ATTR "d"
#include "direct-move.h"
diff --git a/gcc/testsuite/gcc.target/powerpc/direct-move-long2.c b/gcc/testsuite/gcc.target/powerpc/direct-move-long2.c
index fba613e4548..cee9e0e0f1d 100644
--- a/gcc/testsuite/gcc.target/powerpc/direct-move-long2.c
+++ b/gcc/testsuite/gcc.target/powerpc/direct-move-long2.c
@@ -10,5 +10,6 @@
#define IS_INT 1
#define NO_ALTIVEC 1
#define DO_MAIN
+#define VSX_REG_ATTR "d"
#include "direct-move.h"
diff --git a/gcc/testsuite/gcc.target/powerpc/direct-move-vint1.c b/gcc/testsuite/gcc.target/powerpc/direct-move-vint1.c
index cdfa18857f1..3067b9a8e62 100644
--- a/gcc/testsuite/gcc.target/powerpc/direct-move-vint1.c
+++ b/gcc/testsuite/gcc.target/powerpc/direct-move-vint1.c
@@ -3,11 +3,12 @@
/* { dg-skip-if "" { powerpc*-*-*spe* } { "*" } { "" } } */
/* { dg-require-effective-target powerpc_p8vector_ok } */
/* { dg-options "-mcpu=power8 -O2" } */
-/* { dg-final { scan-assembler-times "mtvsrd" 4 } } */
-/* { dg-final { scan-assembler-times "mfvsrd" 4 } } */
+/* { dg-final { scan-assembler "mtvsrd" } } */
+/* { dg-final { scan-assembler "mfvsrd" } } */
-/* Check code generation for direct move for long types. */
+/* Check code generation for direct move for vector types. */
#define TYPE vector int
+#define VSX_REG_ATTR "wa"
#include "direct-move.h"
diff --git a/gcc/testsuite/gcc.target/powerpc/direct-move-vint2.c b/gcc/testsuite/gcc.target/powerpc/direct-move-vint2.c
index 5c0c9abdac5..0d8264faf71 100644
--- a/gcc/testsuite/gcc.target/powerpc/direct-move-vint2.c
+++ b/gcc/testsuite/gcc.target/powerpc/direct-move-vint2.c
@@ -8,5 +8,6 @@
#define TYPE vector int
#define DO_MAIN
+#define VSX_REG_ATTR "wa"
#include "direct-move.h"
diff --git a/gcc/testsuite/gcc.target/powerpc/direct-move.h b/gcc/testsuite/gcc.target/powerpc/direct-move.h
index c1709e6c7ef..6a5b7ba1806 100644
--- a/gcc/testsuite/gcc.target/powerpc/direct-move.h
+++ b/gcc/testsuite/gcc.target/powerpc/direct-move.h
@@ -3,6 +3,10 @@
#include <math.h>
extern void abort (void);
+#ifndef VSX_REG_ATTR
+#define VSX_REG_ATTR "wa"
+#endif
+
void __attribute__((__noinline__))
copy (TYPE *a, TYPE *b)
{
@@ -44,7 +48,7 @@ void __attribute__((__noinline__))
load_vsx (TYPE *a, TYPE *b)
{
TYPE c = *a;
- __asm__ ("# vsx, reg = %x0" : "+wa" (c));
+ __asm__ ("# vsx, reg = %x0" : "+" VSX_REG_ATTR (c));
*b = c;
}
#endif
@@ -57,7 +61,7 @@ load_gpr_to_vsx (TYPE *a, TYPE *b)
TYPE d;
__asm__ ("# gpr, reg = %0" : "+b" (c));
d = c;
- __asm__ ("# vsx, reg = %x0" : "+wa" (d));
+ __asm__ ("# vsx, reg = %x0" : "+" VSX_REG_ATTR (d));
*b = d;
}
#endif
@@ -68,7 +72,7 @@ load_vsx_to_gpr (TYPE *a, TYPE *b)
{
TYPE c = *a;
TYPE d;
- __asm__ ("# vsx, reg = %x0" : "+wa" (c));
+ __asm__ ("# vsx, reg = %x0" : "+" VSX_REG_ATTR (c));
d = c;
__asm__ ("# gpr, reg = %0" : "+b" (d));
*b = d;
diff --git a/gcc/testsuite/gcc.target/powerpc/p8vector-ldst.c b/gcc/testsuite/gcc.target/powerpc/p8vector-ldst.c
index d0b3eb09ef7..33f19991f76 100644
--- a/gcc/testsuite/gcc.target/powerpc/p8vector-ldst.c
+++ b/gcc/testsuite/gcc.target/powerpc/p8vector-ldst.c
@@ -36,7 +36,7 @@ void store_df (double *p, double d)
*p = d;
}
-/* { dg-final { scan-assembler-times "lxsspx" 2 } } */
-/* { dg-final { scan-assembler-times "lxsdx" 1 } } */
-/* { dg-final { scan-assembler-times "stxsspx" 1 } } */
-/* { dg-final { scan-assembler-times "stxsdx" 1 } } */
+/* { dg-final { scan-assembler "lxsspx" } } */
+/* { dg-final { scan-assembler "lxsdx" } } */
+/* { dg-final { scan-assembler "stxsspx" } } */
+/* { dg-final { scan-assembler "stxsdx" } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/pr59054.c b/gcc/testsuite/gcc.target/powerpc/pr59054.c
index 0379aeee635..052f238ba0e 100644
--- a/gcc/testsuite/gcc.target/powerpc/pr59054.c
+++ b/gcc/testsuite/gcc.target/powerpc/pr59054.c
@@ -4,15 +4,3 @@
/* { dg-options "-mcpu=power7 -O0 -m64" } */
long foo (void) { return 0; }
-
-/* { dg-final { scan-assembler-not "xxlor" } } */
-/* { dg-final { scan-assembler-not "stfd" } } */
-/* { dg-do compile { target { powerpc*-*-* && lp64 } } } */
-/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
-/* { dg-require-effective-target powerpc_vsx_ok } */
-/* { dg-options "-mcpu=power7 -O0 -m64" } */
-
-long foo (void) { return 0; }
-
-/* { dg-final { scan-assembler-not "xxlor" } } */
-/* { dg-final { scan-assembler-not "stfd" } } */