+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.
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)
{
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;
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";
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,
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)
{
ix86_free_from_memory (mode)
enum machine_mode mode;
{
- if (!TARGET_64BIT || !TARGET_RED_ZONE)
+ if (!TARGET_RED_ZONE)
{
int size;