diff options
author | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-09-10 15:21:18 +0000 |
---|---|---|
committer | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-09-10 15:21:18 +0000 |
commit | 6c6dc52075a16822b622dba2a09ee1da00699913 (patch) | |
tree | 84b52cb4914fe1d57662b286e0ad66d3b56a337f /gcc/testsuite/gcc.target/mips/call-saved-3.c | |
parent | 7938ee8cfc0017a56ad839e2624b953d6c5465af (diff) | |
download | gcc-6c6dc52075a16822b622dba2a09ee1da00699913.tar.gz |
gcc/
* config/mips/mips.c (mips_global_pointer): Check
call_really_used_regs instead of call_used_regs.
(mips_save_reg_p): Likewise. Save all call-saved registers
if current_function_saves_all_registers. Fix indentation.
No longer treat $18 as a special case.
(compute_frame_size): Guard FPR loop with TARGET_HARD_FLOAT.
gcc/testsuite/
* gcc.target/mips/call-saved-1.c: New test.
* gcc.target/mips/call-saved-2.c: Likewise.
* gcc.target/mips/call-saved-3.c: Likewise.
* gcc.target/mips/mips.exp (setup_mips_tests): Set mips_gp64
instead of mips_mips64. Set mips_fp64 too.
(is_gp32_flag): Return true for -mips1 and -mips2.
(dg-mips-options): Use mips_gp64 instead of mips_mips64.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@128347 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.target/mips/call-saved-3.c')
-rw-r--r-- | gcc/testsuite/gcc.target/mips/call-saved-3.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/mips/call-saved-3.c b/gcc/testsuite/gcc.target/mips/call-saved-3.c new file mode 100644 index 00000000000..f1d93793b3c --- /dev/null +++ b/gcc/testsuite/gcc.target/mips/call-saved-3.c @@ -0,0 +1,21 @@ +/* Check that we save all call-saved GPRs in a MIPS16 __builtin_setjmp + function. */ +/* { dg-mips-options "-mips2 -mips16 -mno-abicalls -O2" } */ + +void bar (void); +extern int buf[]; +void +foo (int x) +{ + if (__builtin_setjmp (buf) == 0) + bar(); +} +/* { dg-final { scan-assembler "\\\$16" } } */ +/* { dg-final { scan-assembler "\\\$17" } } */ +/* { dg-final { scan-assembler "\\\$18" } } */ +/* { dg-final { scan-assembler "\\\$19" } } */ +/* { dg-final { scan-assembler "\\\$20" } } */ +/* { dg-final { scan-assembler "\\\$21" } } */ +/* { dg-final { scan-assembler "\\\$22" } } */ +/* { dg-final { scan-assembler "\\\$23" } } */ +/* { dg-final { scan-assembler "\\\$(30|fp)" } } */ |