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__
)));
9 typedef int aligned
__attribute__((aligned(64)));
11 #define UIRRV 0x12345670
12 #define RIP 0x12345671
13 #define RFLAGS 0x12345672
14 #define RSP 0x12345673
16 #define STRING(x) XSTRING(x)
18 #define ASMNAME(cname) ASMNAME2 (__USER_LABEL_PREFIX__, cname)
19 #define ASMNAME2(prefix, cname) XSTRING (prefix) cname
22 check_int (int *i
, int align
)
25 if ((((ptrdiff_t) i
) & (align
- 1)) != 0)
31 __attribute__((interrupt
, used
))
32 fn (struct __uintr_frame
*frame
, uword_t uirrv
)
35 if (check_int (&i
, __alignof__(i
)) != i
)
40 if (RIP
!= frame
->rip
)
42 if (RFLAGS
!= frame
->rflags
)
44 if (RSP
!= frame
->rsp
)
53 asm ("push $" STRING (RSP
) "; \
54 push $" STRING (RFLAGS
) "; \
55 push $" STRING (RIP
) "; \
56 push $" STRING (UIRRV
) "; \
57 jmp " ASMNAME ("fn"));