mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-03 21:51:45 +08:00
code-readable-4.c: New test.
gcc/testsuite/ * gcc.target/mips/code-readable-4.c: New test. From-SVN: r190630
This commit is contained in:
parent
d81168901e
commit
9c7ec9687e
@ -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>
|
||||
|
||||
|
34
gcc/testsuite/gcc.target/mips/code-readable-4.c
Normal file
34
gcc/testsuite/gcc.target/mips/code-readable-4.c
Normal file
@ -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\\)" } } */
|
Loading…
x
Reference in New Issue
Block a user