diff options
author | Jan Hubicka <jh@suse.cz> | 2003-04-02 22:19:30 +0000 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2003-04-02 22:19:30 +0000 |
commit | a5b378d6f7919d686c194efa5f322914b4dc744d (patch) | |
tree | 5423b76b2f79b1a8bd05ad0220268da746fe3917 /gcc | |
parent | 8fc9a7ba7b2f94550dcc912b917d7429ea1f081f (diff) | |
download | gcc-a5b378d6f7919d686c194efa5f322914b4dc744d.zip gcc-a5b378d6f7919d686c194efa5f322914b4dc744d.tar.gz gcc-a5b378d6f7919d686c194efa5f322914b4dc744d.tar.bz2 |
i386.c (override_options): Disable red zone by default on i386.
* i386.c (override_options): Disable red zone by default on i386.
(compute_frame_layout, ix86_force_to_memory, ix86_free_from_memory):
Do not test TARGET_64BIT together with TARGET_RED_ZONE
From-SVN: r65178
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/config/i386/i386.c | 18 |
2 files changed, 19 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index bfbcc94..7ee299b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +Thu Apr 3 00:18:49 CEST 2003 Jan HUbicka <jh@suse.cz> + + * i386.c (override_options): Disable red zone by default on i386. + (compute_frame_layout, ix86_force_to_memory, ix86_free_from_memory): + Do not test TARGET_64BIT together with TARGET_RED_ZONE + 2003-04-02 Kazu Hirata <kazu@cs.umass.edu> * config/h8300/h8300.md (a peephole2): Tighten the condition. diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 9c6653c..80a280f 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -1380,7 +1380,13 @@ override_options () ix86_fpmath = FPMATH_SSE; } else - ix86_fpmath = FPMATH_387; + { + ix86_fpmath = FPMATH_387; + /* i386 ABI does not specify red zone. It still makes sense to use it + when programmer takes care to stack from being destroyed. */ + if (!(target_flags_explicit & MASK_NO_RED_ZONE)) + target_flags |= MASK_NO_RED_ZONE; + } if (ix86_fpmath_string != 0) { @@ -5026,7 +5032,7 @@ ix86_compute_frame_layout (frame) if (!frame->to_allocate && frame->nregs <= 1) frame->save_regs_using_mov = false; - if (TARGET_64BIT && TARGET_RED_ZONE && current_function_sp_is_unchanging + if (TARGET_RED_ZONE && current_function_sp_is_unchanging && current_function_is_leaf) { frame->red_zone_size = frame->to_allocate; @@ -6074,11 +6080,13 @@ legitimate_address_p (mode, addr, strict) that never results in lea, this seems to be easier and correct fix for crash to disable this test. */ } +#if 0 else if (!CONSTANT_ADDRESS_P (disp)) { reason = "displacement is not constant"; goto report_error; } +#endif else if (TARGET_64BIT && !x86_64_sign_extended_value (disp)) { reason = "displacement is out of range"; @@ -14572,7 +14580,7 @@ ix86_force_to_memory (mode, operand) rtx result; if (!reload_completed) abort (); - if (TARGET_64BIT && TARGET_RED_ZONE) + if (TARGET_RED_ZONE) { result = gen_rtx_MEM (mode, gen_rtx_PLUS (Pmode, @@ -14580,7 +14588,7 @@ ix86_force_to_memory (mode, operand) GEN_INT (-RED_ZONE_SIZE))); emit_move_insn (result, operand); } - else if (TARGET_64BIT && !TARGET_RED_ZONE) + else if (!TARGET_RED_ZONE && TARGET_64BIT) { switch (mode) { @@ -14649,7 +14657,7 @@ void ix86_free_from_memory (mode) enum machine_mode mode; { - if (!TARGET_64BIT || !TARGET_RED_ZONE) + if (!TARGET_RED_ZONE) { int size; |