Merge aosp-toolchain/gcc/gcc-4_9 changes.
[official-gcc.git] / gcc-4_9 / gcc / testsuite / gcc.target / mips / call-clobbered-4.c
blob51498b8fa283aa96b333ef42dd1f88306f165b32
1 /* Check that we handle call-clobbered FPRs correctly.
2 This test differs from call-clobbered-3.c because when optimising for size
3 a callee-saved GPR is used for 'b' to cross the call. */
4 /* { dg-skip-if "code quality test" { *-*-* } { "*" } { "-Os" } } */
5 /* { dg-options "-mabi=32 -modd-spreg -mfpxx -ffixed-f0 -ffixed-f1 -ffixed-f2 -ffixed-f3 -ffixed-f4 -ffixed-f5 -ffixed-f6 -ffixed-f7 -ffixed-f8 -ffixed-f9 -ffixed-f10 -ffixed-f11 -ffixed-f12 -ffixed-f13 -ffixed-f14 -ffixed-f15 -ffixed-f16 -ffixed-f17 -ffixed-f18 -ffixed-f19 -ffixed-f20 -ffixed-f22 -ffixed-f24 -ffixed-f26 -ffixed-f28 -ffixed-f30" } */
7 void bar (void);
8 float a;
9 float
10 foo ()
12 float b = a + 1.0f;
13 bar();
14 return b;
16 /* { dg-final { scan-assembler-times "lwc1" 4 } } */
17 /* { dg-final { scan-assembler-times "swc1" 2 } } */
18 /* { dg-final { scan-assembler-times "mtc" 1 } } */
19 /* { dg-final { scan-assembler-times "mfc" 1 } } */
20 /* { dg-final { scan-assembler-not "mthc" } } */
21 /* { dg-final { scan-assembler-not "mfhc" } } */
22 /* { dg-final { scan-assembler-not "ldc1" } } */
23 /* { dg-final { scan-assembler-not "sdc1" } } */