aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/apx-push2pop2_interrupt-1.c
blob: a5b4689320862c9466080db37cb2c10ec590449f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/* { dg-do compile { target { ! ia32 } } } */
/* { dg-options "-O2 -mapx-features=egpr,push2pop2 -mgeneral-regs-only -mno-cld -mno-push-args -maccumulate-outgoing-args" } */

extern void foo (void *) __attribute__ ((interrupt));

extern int bar (int);

void foo (void *frame)
{
  int a,b,c,d,e,f,i;
  a = bar (5);
  b = bar (a);
  c = bar (b);
  d = bar (c);
  e = bar (d);
  f = bar (e);
  for (i = 1; i < 10; i++)
  {
    a += bar (a + i) + bar (b + i) +
         bar (c + i) + bar (d + i) +
         bar (e + i) + bar (f + i);
  }
}

/* { dg-final { scan-assembler-times "pushq" 31 } } */
/* { dg-final { scan-assembler-times "popq" 31 } } */
/* { dg-final { scan-assembler-not "push2\[\\t \]+" } } */
/* { dg-final { scan-assembler-not "pop2\[\\t \]+" } } */