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:
Richard Sandiford 2012-08-23 20:40:07 +00:00 committed by Richard Sandiford
parent d81168901e
commit 9c7ec9687e
2 changed files with 38 additions and 0 deletions

View File

@ -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>

View 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\\)" } } */