From 9c7ec9687ee3fe07b112494b8eea2da239067fcc Mon Sep 17 00:00:00 2001 From: Richard Sandiford Date: Thu, 23 Aug 2012 20:40:07 +0000 Subject: code-readable-4.c: New test. gcc/testsuite/ * gcc.target/mips/code-readable-4.c: New test. From-SVN: r190630 --- gcc/testsuite/ChangeLog | 4 +++ gcc/testsuite/gcc.target/mips/code-readable-4.c | 34 +++++++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 gcc/testsuite/gcc.target/mips/code-readable-4.c 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 + + * gcc.target/mips/code-readable-4.c: New test. + 2012-08-23 Julian Brown Sandra Loosemore 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\\)" } } */ -- cgit v1.1