1 /* Test that the ms_hook_prologue attribute generates the correct code. */
4 /* { dg-require-effective-target ilp32 } */
5 /* { dg-options "-O2 -fomit-frame-pointer" } */
7 int __attribute__ ((__ms_hook_prologue__)) foo ()
9 unsigned char *ptr = (unsigned char *) foo;
11 /* The NOP mov must not be optimized away by optimizations.
12 The push %ebp, mov %esp, %ebp must not be removed by
13 -fomit-frame-pointer */
15 /* movl.s %edi, %edi */
16 if(*ptr++ != 0x8b) return 1;
17 if(*ptr++ != 0xff) return 1;
19 if(*ptr++ != 0x55) return 1;
20 /* movl.s %esp, %ebp */
21 if(*ptr++ != 0x8b) return 1;
22 if(*ptr++ != 0xec) return 1;