This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: Don't allocate space for SSE reg in reg save area if SSE is disabled
- From: Jan Hubicka <jh at suse dot cz>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: "H.J. Lu" <hjl dot tools at gmail dot com>, gcc-patches at gcc dot gnu dot org, ubizjak at gmail dot com, torvalds at linux-foundation dot org, jh at suse dot cz
- Date: Mon, 1 Sep 2008 17:49:32 +0200
- Subject: Re: PATCH: Don't allocate space for SSE reg in reg save area if SSE is disabled
- References: <20080828165745.GA26488@lucon.org> <20080828170449.GA1738@lucon.org> <20080828172324.GD32376@hs20-bc2-1.build.redhat.com> <20080829150748.GA2002@lucon.org> <20080901103121.GO32376@hs20-bc2-1.build.redhat.com>
>
> 2008-09-01 H.J. Lu <hongjiu.lu@intel.com>
> Jakub Jelinek <jakub@redhat.com>
>
> * config/i386/i386.c (X86_64_VARARGS_SIZE): Removed.
> (setup_incoming_varargs_64): Assume cum != NULL. Set/check
> ix86_varargs_gpr_size and ix86_varargs_fpr_size. Use
> ix86_varargs_gpr_size instead of X86_64_REGPARM_MAX.
> Don't set ix86_save_varrargs_registers.
> (ix86_setup_incoming_varargs): Assume cum != NULL.
> (ix86_va_start): Check ix86_varargs_gpr_size and
> ix86_varargs_fpr_size instead of cfun->va_list_gpr_size and
> cfun->va_list_fpr_size, respectively. Subtract 8*X86_64_REGPARM_MAX
> from frame pointer if ix86_varargs_gpr_size == 0.
> (ix86_compute_frame_layout): Updated.
>
> * config/i386/i386.h (ix86_save_varrargs_registers): Removed.
> (ix86_varargs_gpr_size): Define.
> (ix86_varargs_fpr_size): Likewise.
> (machine_function): Remove save_varrargs_registers.
> Add varargs_gpr_size and varargs_fpr_size.
>
> * gcc.target/i386/amd64-abi-3.c: New test.
> * gcc.target/i386/amd64-abi-4.c: Likewise.
> * gcc.target/i386/amd64-abi-5.c: Likewise.
> * gcc.target/i386/amd64-abi-6.c: Likewise.
This is OK, thanks!
> - /* Indicate to allocate space on the stack for varargs save area. */
> - ix86_save_varrargs_registers = 1;
> + /* FPR size of varargs save area. We don't need it if we don't pass
> + anything in SSE registers. */
> + if (cum->sse_nregs && cfun->va_list_fpr_size)
> + ix86_varargs_fpr_size = X86_64_SSE_REGPARM_MAX * 16;
I would probably preffer to have else ix86_varargs_fpr_size = 0; as it
at least made me run across the patch to see where else this is
modified. ;)
Honza