1 /* { dg-do run { target { { i?86-*-* x86_64-*-* } && { ! ia32 } } } } */
2 /* { dg-skip-if "PR81210 sp not aligned to 16 bytes" { *-*-darwin* } } */
3 /* { dg-options "-muintr -mgeneral-regs-only" } */
5 #include <x86gprintrin.h>
7 extern void exit (int);
8 typedef unsigned int uword_t
__attribute__ ((mode (__word__
)));
10 #define UIRRV 0x12345670
11 #define RIP 0x12345671
12 #define RFLAGS 0x12345672
13 #define RSP 0x12345673
15 #define STRING(x) XSTRING(x)
17 #define ASMNAME(cname) ASMNAME2 (__USER_LABEL_PREFIX__, cname)
18 #define ASMNAME2(prefix, cname) XSTRING (prefix) cname
21 __attribute__((interrupt
, used
))
22 fn (struct __uintr_frame
*frame
, uword_t uirrv
)
26 if (RIP
!= frame
->rip
)
28 if (RFLAGS
!= frame
->rflags
)
30 if (RSP
!= frame
->rsp
)
39 asm ("push $" STRING (RSP
) "; \
40 push $" STRING (RFLAGS
) "; \
41 push $" STRING (RIP
) "; \
42 push $" STRING (UIRRV
) "; \
43 jmp " ASMNAME ("fn"));