| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-O2 -fdump-tree-dom2-details -w" } */ |
| 3 |
struct rtx_def; |
| 4 |
typedef struct rtx_def *rtx; |
| 5 |
struct machine_frame_state |
| 6 |
{ |
| 7 |
rtx cfa_reg; |
| 8 |
long sp_offset; |
| 9 |
}; |
| 10 |
struct machine_function { |
| 11 |
struct machine_frame_state fs; |
| 12 |
}; |
| 13 |
enum global_rtl_index |
| 14 |
{ |
| 15 |
GR_PC, |
| 16 |
GR_CC0, |
| 17 |
GR_RETURN, |
| 18 |
GR_SIMPLE_RETURN, |
| 19 |
GR_STACK_POINTER, |
| 20 |
GR_FRAME_POINTER, |
| 21 |
GR_HARD_FRAME_POINTER, |
| 22 |
GR_ARG_POINTER, |
| 23 |
GR_VIRTUAL_INCOMING_ARGS, |
| 24 |
GR_VIRTUAL_STACK_ARGS, |
| 25 |
GR_VIRTUAL_STACK_DYNAMIC, |
| 26 |
GR_VIRTUAL_OUTGOING_ARGS, |
| 27 |
GR_VIRTUAL_CFA, |
| 28 |
GR_VIRTUAL_PREFERRED_STACK_BOUNDARY, |
| 29 |
GR_MAX |
| 30 |
}; |
| 31 |
struct target_rtl { |
| 32 |
rtx x_global_rtl[GR_MAX]; |
| 33 |
}; |
| 34 |
extern struct target_rtl default_target_rtl; |
| 35 |
struct function { |
| 36 |
struct machine_function * machine; |
| 37 |
}; |
| 38 |
extern struct function *cfun; |
| 39 |
struct ix86_frame |
| 40 |
{ |
| 41 |
long stack_pointer_offset; |
| 42 |
}; |
| 43 |
int ix86_target_stack_probe (void); |
| 44 |
int pro_epilogue_adjust_stack (rtx, rtx, rtx, int, int); |
| 45 |
rtx gen_rtx_CONST_INT (int); |
| 46 |
void fancy_abort (const char *, int, const char *); |
| 47 |
void |
| 48 |
ix86_expand_prologue (void) |
| 49 |
{ |
| 50 |
struct machine_function *m = (cfun + 0)->machine; |
| 51 |
struct ix86_frame frame; |
| 52 |
long allocate; |
| 53 |
allocate = frame.stack_pointer_offset - m->fs.sp_offset; |
| 54 |
if (allocate == 0) |
| 55 |
; |
| 56 |
else if (!ix86_target_stack_probe ()) |
| 57 |
{ |
| 58 |
pro_epilogue_adjust_stack ((((&default_target_rtl)->x_global_rtl)[GR_STACK_POINTER]), (((&default_target_rtl)->x_global_rtl)[GR_STACK_POINTER]), |
| 59 |
gen_rtx_CONST_INT ((-allocate)), -1, |
| 60 |
m->fs.cfa_reg == (((&default_target_rtl)->x_global_rtl)[GR_STACK_POINTER])); |
| 61 |
} |
| 62 |
((void)(!(m->fs.sp_offset == frame.stack_pointer_offset) ? fancy_abort ("../../gcc-4.7.3/gcc/config/i386/i386.c", 10435, __FUNCTION__), 0 : 0)); |
| 63 |
} |
| 64 |
|
| 65 |
/* In the case where ALLOCATE is zero, we know that sp_offset and |
| 66 |
stack_poitner_offset within their respective structures are the |
| 67 |
same. That allows us to thread the jump from the true arm of the |
| 68 |
first IF conditional around the test controlling the call to |
| 69 |
fancy_abort. */ |
| 70 |
/* { dg-final { scan-tree-dump-times "Threaded" 1 "dom2"} } */ |
| 71 |
|