+2017-08-01 Daniel Santos <daniel.santos@pobox.com>
+
+ * config/i386/i386.h (ix86_frame::outlined_save_offset): Remove field.
+ (machine_function::call_ms2sysv_pad_out): Remove field.
+ * config/i386/i386.c (xlogue_layout::get_stack_space_used): Modify.
+ (ix86_compute_frame_layout): Likewise.
+
2017-08-01 H.J. Lu <hongjiu.lu@intel.com>
PR target/81654
calls.
2017-08-01 Jerome Lambourg <lambourg@adacore.com>
- Doug Rupp <rupp@adacore.com>
- Olivier Hainque <hainque@adacore.com>
+ Doug Rupp <rupp@adacore.com>
+ Olivier Hainque <hainque@adacore.com>
* config.gcc (arm-wrs-vxworks*): Rework to handle arm-wrs-vxworks7 as
well as arm-wrs-vxworks. Update target_cpu_name from arm6 (arch v3) to
unsigned last_reg = m->call_ms2sysv_extra_regs + MIN_REGS - 1;
gcc_assert (m->call_ms2sysv_extra_regs <= MAX_EXTRA_REGS);
- return m_regs[last_reg].offset
- + (m->call_ms2sysv_pad_out ? 8 : 0)
- + STUB_INDEX_OFFSET;
+ return m_regs[last_reg].offset + STUB_INDEX_OFFSET;
}
/* Returns the offset for the base pointer used by the stub. */
{
unsigned count = xlogue_layout::count_stub_managed_regs ();
m->call_ms2sysv_extra_regs = count - xlogue_layout::MIN_REGS;
+ m->call_ms2sysv_pad_in = 0;
}
}
frame->nregs = ix86_nsaved_regs ();
frame->nsseregs = ix86_nsaved_sseregs ();
- m->call_ms2sysv_pad_in = 0;
- m->call_ms2sysv_pad_out = 0;
/* 64-bit MS ABI seem to require stack alignment to be always 16,
except for function prologues, leaf functions and when the defult
gcc_assert (!frame->nsseregs);
m->call_ms2sysv_pad_in = !!(offset & UNITS_PER_WORD);
-
- /* Select an appropriate layout for incoming stack offset. */
- const struct xlogue_layout &xlogue = xlogue_layout::get_instance ();
-
- if ((offset + xlogue.get_stack_space_used ()) & UNITS_PER_WORD)
- m->call_ms2sysv_pad_out = 1;
-
- offset += xlogue.get_stack_space_used ();
- gcc_assert (!(offset & 0xf));
- frame->outlined_save_offset = offset;
+ offset += xlogue_layout::get_instance ().get_stack_space_used ();
}
/* Align and set SSE register save area. */
/* Align start of frame for local function. */
if (stack_realign_fp
+ || m->call_ms2sysv
|| offset != frame->sse_reg_save_offset
|| size != 0
|| !crtl->is_leaf
<- end of stub-saved/restored regs
[padding1]
]
- <- outlined_save_offset
- <- sse_regs_save_offset
+ <- sse_reg_save_offset
[padding2]
| <- FRAME_POINTER
[va_arg registers] |
HOST_WIDE_INT reg_save_offset;
HOST_WIDE_INT stack_realign_allocate_offset;
HOST_WIDE_INT stack_realign_offset;
- HOST_WIDE_INT outlined_save_offset;
HOST_WIDE_INT sse_reg_save_offset;
/* When save_regs_using_mov is set, emit prologue using
BOOL_BITFIELD arg_reg_available : 1;
/* If true, we're out-of-lining reg save/restore for regs clobbered
- by ms_abi functions calling a sysv function. */
+ by 64-bit ms_abi functions calling a sysv_abi function. */
BOOL_BITFIELD call_ms2sysv : 1;
/* If true, the incoming 16-byte aligned stack has an offset (of 8) and
- needs padding. */
+ needs padding prior to out-of-line stub save/restore area. */
BOOL_BITFIELD call_ms2sysv_pad_in : 1;
- /* If true, the size of the stub save area plus inline int reg saves will
- result in an 8 byte offset, so needs padding. */
- BOOL_BITFIELD call_ms2sysv_pad_out : 1;
-
/* This is the number of extra registers saved by stub (valid range is
0-6). Each additional register is only saved/restored by the stubs
if all successive ones are. (Will always be zero when using a hard