1 /* Check local register variables using a register conventionally
2 used as the frame pointer aren't clobbered under high register pressure. */
4 /* { dg-skip-if "incompatible options" { ! { arm_thumb1_ok || arm_thumb2_ok } } { "*" } { "" } } */
5 /* { dg-options "-Os -mthumb -fomit-frame-pointer" } */
11 void __attribute__((noinline
)) foo(int p1
, int p2
, int p3
, int p4
)
13 if (global
!= 5 || p1
!= 1 || p2
!= 2 || p3
!= 3 || p4
!= 4)
17 int __attribute__((noinline
)) test(int a
, int b
, int c
, int d
)
19 register unsigned long r
__asm__("r7") = 0xdeadbeef;
22 /* ABCD are live after the call which should be enough
23 to cause r7 to be used if it weren't for the register variable. */
27 __asm__
__volatile__ ("mov %0, %2"
38 if (test(1, 2, 3, 4) != 0xdeadbeef)