1 /* { dg-do run { target i?86-*-* x86_64-*-* } } */
2 /* { dg-options "-mgeneral-regs-only" } */
4 extern void exit (int);
6 typedef unsigned int uword_t
__attribute__ ((mode (__word__
)));
8 #define ERROR 0x12345670
11 #define FLAGS 0x12345673
15 #define STRING(x) XSTRING(x)
17 #define ASMNAME(cname) ASMNAME2 (__USER_LABEL_PREFIX__, cname)
18 #define ASMNAME2(prefix, cname) XSTRING (prefix) cname
20 struct interrupt_frame
29 __attribute__((interrupt
, used
))
31 fn (struct interrupt_frame
*frame
, uword_t error
)
39 if (FLAGS
!= frame
->flags
)
52 asm ("push $" STRING (SS
) "; \
53 push $" STRING (SP
) "; \
54 push $" STRING (FLAGS
) "; \
55 push $" STRING (CS
) "; \
56 push $" STRING (IP
) "; \
57 push $" STRING (ERROR
) "; \
58 jmp " ASMNAME ("fn"));