2 extern void exit (int);
5 /* There used to be a couple of bugs in the ARM's prologue and epilogue
6 generation for ISR routines. The wrong epilogue instruction would be
7 generated to restore the IP register if it had to be pushed onto the
8 stack, and the wrong offset was being computed for local variables if
9 r0 - r3 had to be saved. This tests for both of these cases. */
20 foo (int a
, int b
, int c
, int d
, int e
, int f
, int g
, int h
)
22 volatile int i
= (a
+ b
) - (g
+ h
) + bar ();
23 volatile int j
= (e
+ f
) - (c
+ d
);
25 return a
+ b
+ c
+ d
+ e
+ f
+ g
+ h
+ i
+ j
;
28 int foo1 (int a
, int b
, int c
, int d
, int e
, int f
, int g
, int h
) __attribute__ ((interrupt ("IRQ")));
31 foo1 (int a
, int b
, int c
, int d
, int e
, int f
, int g
, int h
)
33 volatile int i
= (a
+ b
) - (g
+ h
) + bar ();
34 volatile int j
= (e
+ f
) - (c
+ d
);
36 return a
+ b
+ c
+ d
+ e
+ f
+ g
+ h
+ i
+ j
;
44 if (foo (1, 2, 3, 4, 5, 6, 7, 8) != 32)
47 if (foo1 (1, 2, 3, 4, 5, 6, 7, 8) != 32)