From: Daniel Santos Date: Tue, 1 Aug 2017 22:33:16 +0000 (+0000) Subject: [i386] Remove ix86_frame::outlined_save_offset and machine_function::call_ms2sysv_pad_out X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5d9d834de228faac2d1da267f818b4d91d8b7235;p=gcc.git [i386] Remove ix86_frame::outlined_save_offset and machine_function::call_ms2sysv_pad_out ix86_frame::outlined_save_offset isn't used and machine_function::call_ms2sysv_pad_out is an ineffective strategy. 2017-08-01 Daniel Santos * 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. From-SVN: r250803 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 64298bc6d79..7bd462a972b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2017-08-01 Daniel Santos + + * 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 PR target/81654 @@ -47,8 +54,8 @@ calls. 2017-08-01 Jerome Lambourg - Doug Rupp - Olivier Hainque + Doug Rupp + Olivier Hainque * 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 diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 587dbe61e8b..cd20b1be6ec 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -2492,9 +2492,7 @@ public: 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. */ @@ -12865,13 +12863,12 @@ ix86_compute_frame_layout (void) { 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 @@ -12973,16 +12970,7 @@ ix86_compute_frame_layout (void) 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. */ @@ -13010,6 +12998,7 @@ ix86_compute_frame_layout (void) /* 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 diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h index bdea37b7313..e8ae3e3b3cc 100644 --- a/gcc/config/i386/i386.h +++ b/gcc/config/i386/i386.h @@ -2484,8 +2484,7 @@ enum avx_u128_state <- end of stub-saved/restored regs [padding1] ] - <- outlined_save_offset - <- sse_regs_save_offset + <- sse_reg_save_offset [padding2] | <- FRAME_POINTER [va_arg registers] | @@ -2511,7 +2510,6 @@ struct GTY(()) ix86_frame 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 @@ -2647,17 +2645,13 @@ struct GTY(()) machine_function { 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