summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/vmx/spill2.c
diff options
context:
space:
mode:
authorupstream source tree <ports@midipix.org>2015-03-15 20:14:05 -0400
committerupstream source tree <ports@midipix.org>2015-03-15 20:14:05 -0400
commit554fd8c5195424bdbcabf5de30fdc183aba391bd (patch)
tree976dc5ab7fddf506dadce60ae936f43f58787092 /gcc/testsuite/gcc.dg/vmx/spill2.c
downloadcbb-gcc-4.6.4-554fd8c5195424bdbcabf5de30fdc183aba391bd.tar.bz2
cbb-gcc-4.6.4-554fd8c5195424bdbcabf5de30fdc183aba391bd.tar.xz
obtained gcc-4.6.4.tar.bz2 from upstream website;upstream
verified gcc-4.6.4.tar.bz2.sig; imported gcc-4.6.4 source tree from verified upstream tarball. downloading a git-generated archive based on the 'upstream' tag should provide you with a source tree that is binary identical to the one extracted from the above tarball. if you have obtained the source via the command 'git clone', however, do note that line-endings of files in your working directory might differ from line-endings of the respective files in the upstream repository.
Diffstat (limited to 'gcc/testsuite/gcc.dg/vmx/spill2.c')
-rw-r--r--gcc/testsuite/gcc.dg/vmx/spill2.c155
1 files changed, 155 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/vmx/spill2.c b/gcc/testsuite/gcc.dg/vmx/spill2.c
new file mode 100644
index 000000000..4c7337bd0
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vmx/spill2.c
@@ -0,0 +1,155 @@
+#include <altivec.h>
+extern vector unsigned char u8(void);
+extern vector signed char s8(void);
+extern vector bool char b8(void);
+extern vector unsigned short u16(void);
+extern vector signed short s16(void);
+extern vector bool short b16(void);
+extern vector unsigned int u32(void);
+extern vector signed int s32(void);
+extern vector bool int b32(void);
+extern vector float f32(void);
+extern vector pixel p16(void);
+extern double d(void);
+extern int i(void);
+
+extern void g(vector unsigned char, ...);
+
+void f()
+{
+ int i1l = i();
+ vector unsigned char u8l = u8();
+ vector signed char s8l = s8();
+ vector bool char b8l = b8();
+ int i2l = i();
+ vector unsigned short u16l = u16();
+ vector signed short s16l = s16();
+ vector bool short b16l = b16();
+ int i3l = i();
+ vector unsigned int u32l = u32();
+ vector signed int s32l = s32();
+ vector bool int b32l = b32();
+ double d1l = d();
+ vector float f32l = f32();
+ vector pixel p16l = p16();
+ double d2l = d();
+ vector unsigned char u8lx = u8();
+ vector signed char s8lx = s8();
+ vector bool char b8lx = b8();
+ vector unsigned short u16lx = u16();
+ vector signed short s16lx = s16();
+ vector bool short b16lx = b16();
+ vector unsigned int u32lx = u32();
+ vector signed int s32lx = s32();
+ vector bool int b32lx = b32();
+ vector float f32lx = f32();
+ vector pixel p16lx = p16();
+
+ if (i1l)
+ g(u8l, s8l, b8l, u16l, s16l, b16l, u32l, s32l, b32l, f32l, p16l,
+ u8lx, s8lx, b8lx, u16lx, s16lx, b16lx, u32lx, s32lx, b32lx, f32lx, p16lx,
+ i1l, i2l, i3l, d1l, d2l);
+ g(u8l, i1l, i2l, i3l, d1l, d2l);
+}
+
+double
+d(void)
+{
+ static double zero;
+ return zero;
+}
+
+int
+i(void)
+{
+ static int non_zero;
+ return ++non_zero;
+}
+
+vector unsigned char
+u8(void)
+{
+ static vector unsigned char zero;
+ return zero;
+}
+
+vector signed char
+s8(void)
+{
+ static vector signed char zero;
+ return zero;
+}
+
+vector bool char
+b8(void)
+{
+ static vector bool char zero;
+ return zero;
+}
+
+vector unsigned short
+u16(void)
+{
+ static vector unsigned short zero;
+ return zero;
+}
+
+vector signed short
+s16(void)
+{
+ static vector signed short zero;
+ return zero;
+}
+
+vector bool short
+b16(void)
+{
+ static vector bool short zero;
+ return zero;
+}
+
+vector unsigned int
+u32(void)
+{
+ static vector unsigned int zero;
+ return zero;
+}
+
+vector signed int
+s32(void)
+{
+ static vector signed int zero;
+ return zero;
+}
+
+vector bool int
+b32(void)
+{
+ static vector bool int zero;
+ return zero;
+}
+
+vector float
+f32(void)
+{
+ static vector float zero;
+ return zero;
+}
+
+vector pixel
+p16(void)
+{
+ static vector pixel zero;
+ return zero;
+}
+
+void
+g(vector unsigned char a, ...)
+{
+}
+
+int main()
+{
+ f();
+ return 0;
+}