diff options
Diffstat (limited to 'gcc/testsuite/gcc.target/mips/octeon-exts-2.c')
-rw-r--r-- | gcc/testsuite/gcc.target/mips/octeon-exts-2.c | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/mips/octeon-exts-2.c b/gcc/testsuite/gcc.target/mips/octeon-exts-2.c new file mode 100644 index 000000000..fc5df639d --- /dev/null +++ b/gcc/testsuite/gcc.target/mips/octeon-exts-2.c @@ -0,0 +1,37 @@ +/* { dg-do compile } */ +/* { dg-options "-O -march=octeon -meb" } */ +/* { dg-final { scan-assembler-times "\texts\t" 4 } } */ + +struct bar +{ + unsigned long long a:1; + long long b:14; + unsigned long long c:48; + long long d:1; +}; + +NOMIPS16 int +f1 (struct bar *s, int a) +{ + return (int) s->b + a; +} + +NOMIPS16 char +f2 (struct bar *s) +{ + return s->d + 1; +} + +NOMIPS16 int +f3 () +{ + struct bar s; + asm ("" : "=r"(s)); + return (int) s.b + 1; +} + +NOMIPS16 long long +f4 (struct bar *s) +{ + return s->d; +} |