This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [4/6] stack branch merge to trunk -- Update x86 backend


On Tue, Jun 10, 2008 at 2:42 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
> Hi Jan,
>
> Here is the stack alignment change for x86 backend. Ok for trunk
> if the middle end changes are approved?
>

Here is the patch.

Thanks.

-- 
H.J.
---
2008-06-10  Joey Ye  <joey.ye@intel.com>
	    H.J. Lu  <hongjiu.lu@intel.com>

	* config/i386/i386.c (ix86_force_align_arg_pointer_string):
	Break long line.
	(ix86_gen_andsp): New.
	(ix86_user_incoming_stack_boundary): Likewise.
	(ix86_default_incoming_stack_boundary): Likewise.
	(ix86_incoming_stack_boundary): Likewise.
	(ix86_can_eliminate): Likewise.
	(find_drap_reg): Likewise.
	(ix86_update_stack_boundary): Likewise.
	(ix86_get_drap_rtx): Likewise.
	(ix86_finalize_stack_realign_flags): Likewise.
	(TARGET_UPDATE_STACK_BOUNDARY): Likewise.
	(TARGET_GET_DRAP_RTX): Likewise.
	(override_options): Overide option value for new options.
	(ix86_function_ok_for_sibcall): Remove check for
	force_align_arg_pointer.
	(ix86_handle_cconv_attribute): Likewise.
	(ix86_function_regparm): Likewise.
	(setup_incoming_varargs_64): Don't set stack_alignment_needed
	here.
	(ix86_va_start): Replace virtual_incoming_args_rtx with
	crtl->args.internal_arg_pointer.
	(ix86_select_alt_pic_regnum): Check DRAP register.
	(ix86_save_reg): Replace force_align_arg_pointer with drap_reg.
	(ix86_compute_frame_layout): Compute frame layout wrt stack
	realignment.
	(ix86_internal_arg_pointer): Just return
	virtual_incoming_args_rtx.
	(ix86_expand_prologue): Decide if stack realignment is needed
	and generate prologue code accordingly.
	(ix86_expand_epilogue): Generate epilogue code wrt stack
	realignment is really needed or not.
	
	* config/i386/i386.h (MAIN_STACK_BOUNDARY): New.
	(ABI_STACK_BOUNDARY): Likewise.
	(PREFERRED_STACK_BOUNDARY_DEFAULT): Likewise.
	(STACK_REALIGN_DEFAULT): Likewise.
	(INCOMING_STACK_BOUNDARY): Likewise.
	(MAX_STACK_ALIGNMENT): Likewise.
	(ix86_incoming_stack_boundary): Likewise.
	(FORCE_PREFERRED_STACK_BOUNDARY_IN_MAIN): Removed.
	(REAL_PIC_OFFSET_TABLE_REGNUM): Updated to use BX_REG.
	(CAN_ELIMINATE): Defined with ix86_can_eliminate.
	(machine_function): Remove force_align_arg_pointer.

	* config/i386/i386.md (BX_REG): New.
	(R13_REG): Likewise.

	* config/i386/i386.opt (mforce_drap): New.
	(mincoming-stack-boundary): Likewise.
	(mstackrealign): Add Init(-1).

	* config/i386/i386-protos.h (ix86_can_eliminate): New

Attachment: gcc-stack-v5-4.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]