From: Jan Hubicka <jh@suse.cz>
To: Andi Kleen <ak@suse.de>
Cc: Jan Hubicka <jh@suse.cz>, gcc-patches@gcc.gnu.org
Subject: Re: Allow preferred-stack-boundary of 3 for x86-64
Date: Tue, 31 Jul 2007 05:03:00 -0000 [thread overview]
Message-ID: <20070731034622.GB20007@kam.mff.cuni.cz> (raw)
In-Reply-To: <200707280007.54813.ak@suse.de>
>
> I tested the patch now and I get a ICE while compiling the x86_64 linux kernel
> with -mpreferred-stack-boundary=3 and 070727 SVN checkout + patch
>
> /home/lsrc/quilt/linux/init/do_mounts.c: In function 'change_floppy':
> /home/lsrc/quilt/linux/init/do_mounts.c:390: internal compiler error: in ix86_compute_frame_layout, at config/i386/i386.c:5745
Hi,
this patch should fix it, I will commit it after testing on
x86_64-linux.
Honza
* i386.c (setup_incoming_varargs_64): Tolerate 64bit preferred
stack boundary.
Index: config/i386/i386.c
===================================================================
--- config/i386/i386.c (revision 127065)
+++ config/i386/i386.c (working copy)
@@ -4656,7 +4656,14 @@ setup_incoming_varargs_64 (CUMULATIVE_AR
/* Indicate to allocate space on the stack for varargs save area. */
ix86_save_varrargs_registers = 1;
- cfun->stack_alignment_needed = 128;
+ /* We need 16-byte stack alignment to save SSE registers. If user
+ asked for lower preferred_stack_boundary, lets just hope that he knows
+ what he is doing and won't varargs SSE values.
+
+ We also may end up assuming that only 64bit values are stored in SSE
+ register let some floating point program work. */
+ if (ix86_preferred_stack_boundary >= 128)
+ cfun->stack_alignment_needed = 128;
save_area = frame_pointer_rtx;
set = get_varargs_alias_set ();
prev parent reply other threads:[~2007-07-31 3:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-24 0:54 Jan Hubicka
2007-07-27 22:33 ` Andi Kleen
2007-07-31 5:03 ` Jan Hubicka [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070731034622.GB20007@kam.mff.cuni.cz \
--to=jh@suse.cz \
--cc=ak@suse.de \
--cc=gcc-patches@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).