diff options
author | Richard Sandiford <rdsandiford@googlemail.com> | 2012-08-23 20:40:07 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2012-08-23 20:40:07 +0000 |
commit | 9c7ec9687ee3fe07b112494b8eea2da239067fcc (patch) | |
tree | bb9f4ce5916cb8dd3272d61ff5780a9854a9e20c | |
parent | d81168901eb8ad7d426049a15f50ba0c5591737d (diff) | |
download | gcc-9c7ec9687ee3fe07b112494b8eea2da239067fcc.zip gcc-9c7ec9687ee3fe07b112494b8eea2da239067fcc.tar.gz gcc-9c7ec9687ee3fe07b112494b8eea2da239067fcc.tar.bz2 |
code-readable-4.c: New test.
gcc/testsuite/
* gcc.target/mips/code-readable-4.c: New test.
From-SVN: r190630
-rw-r--r-- | gcc/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/mips/code-readable-4.c | 34 |
2 files changed, 38 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index fcdfa55..3221d14 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2012-08-23 Richard Sandiford <rdsandiford@googlemail.com> + + * gcc.target/mips/code-readable-4.c: New test. + 2012-08-23 Julian Brown <julian@codesourcery.com> Sandra Loosemore <sandra@codesourcery.com> diff --git a/gcc/testsuite/gcc.target/mips/code-readable-4.c b/gcc/testsuite/gcc.target/mips/code-readable-4.c new file mode 100644 index 0000000..d29216f --- /dev/null +++ b/gcc/testsuite/gcc.target/mips/code-readable-4.c @@ -0,0 +1,34 @@ +/* { dg-options "(-mips16) -mcode-readable=yes -mabi=eabi -mgp64 -O" } */ + +MIPS16 int +foo (int i) +{ + switch (i) + { + case 1: return 40; + case 2: return 11; + case 3: return 29; + case 4: return 10; + case 5: return 12; + case 6: return 35; + case 7: return 23; + default: return 0; + } +} + +extern int k[]; + +MIPS16 int * +bar (void) +{ + return k; +} + +/* { dg-final { scan-assembler "\tla\t" } } */ +/* { dg-final { scan-assembler "\t\\.half\t" } } */ +/* { dg-final { scan-assembler-not "%hi\\(\[^)\]*L" } } */ +/* { dg-final { scan-assembler-not "%lo\\(\[^)\]*L" } } */ + +/* { dg-final { scan-assembler "\t\\.dword\tk\n" } } */ +/* { dg-final { scan-assembler-not "%hi\\(k\\)" } } */ +/* { dg-final { scan-assembler-not "%lo\\(k\\)" } } */ |