From 554fd8c5195424bdbcabf5de30fdc183aba391bd Mon Sep 17 00:00:00 2001 From: upstream source tree Date: Sun, 15 Mar 2015 20:14:05 -0400 Subject: obtained gcc-4.6.4.tar.bz2 from upstream website; 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. --- gcc/testsuite/gcc.target/ia64/20030811-1.c | 59 ++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 gcc/testsuite/gcc.target/ia64/20030811-1.c (limited to 'gcc/testsuite/gcc.target/ia64/20030811-1.c') diff --git a/gcc/testsuite/gcc.target/ia64/20030811-1.c b/gcc/testsuite/gcc.target/ia64/20030811-1.c new file mode 100644 index 000000000..45f78b361 --- /dev/null +++ b/gcc/testsuite/gcc.target/ia64/20030811-1.c @@ -0,0 +1,59 @@ +/* Origin: PR target/11693 from Andreas Schwab */ +/* { dg-do compile } */ +/* { dg-options "-O2 -frename-registers" } */ + +static inline unsigned long long +foo (void) +{ + unsigned long long x; + __asm__ __volatile__ ("" : "=r" (x) :: "memory"); + return x; +} + +static inline void +bar (unsigned long long x, unsigned long long y) +{ + __asm__ __volatile__ ("" :: "r"(x), "r"(y) : "memory"); +} + +static inline void +baz (unsigned long long x, unsigned long long y, unsigned long long z, + unsigned long long p, unsigned long long q) +{ + __asm__ __volatile__ ("" :: "r" (q << 2) : "memory"); + __asm__ __volatile__ ("" :: "r" (z) : "memory"); + if (x & 0x1) + __asm__ __volatile__ ("" :: "r" (y), "r" (p) : "memory"); + if (x & 0x2) + __asm__ __volatile__ ("" :: "r" (y), "r" (p) : "memory"); +} + +static inline unsigned long long +ffz (unsigned long long x) +{ + unsigned long long r; + __asm__ ("" : "=r" (r) : "r" (x & (~x - 1))); + return r; +} + +void die (const char *, ...) __attribute__ ((noreturn)); + +void +test (void *x) +{ + unsigned long long a, c; + + a = foo (); + bar (0xc000000000000000LL, 0x660); + bar (0xa00000000000c000LL, 0x539); + baz (2, 1, 0xa000000000008000LL, + ({ unsigned long long b; + b = ({ unsigned long long d; __asm__ ("" : "=r" (d) : "r" (x)); d; }) + + 0x10000000000661LL; + b; + }), + 14); + c = ffz (0x1fffffffffffffffLL); + if (c < 51 || c > 61) + die ("die", c - 1); +} -- cgit v1.2.3