* Don't ICE on varargs with preferred-stack-boundary=3
@ 2007-08-03 23:09 Jan Hubicka
0 siblings, 0 replies; only message in thread
From: Jan Hubicka @ 2007-08-03 23:09 UTC (permalink / raw)
To: ak, gcc-patches
Hi,
when after setting preferred stack boundary to 16 bytes, we get ICE
during construction of varargs prologue.
Varags for SSE will be broken, but for integer registers we are safe
that should be enought for kernel it is intended for .
We also may delay the problems bit further changing code to save just
first 64bits of each SSE register hoping that user won't use any 128bit
values, but I am not sure we want to go that far.
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 ();
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-08-03 23:09 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-03 23:09 Don't ICE on varargs with preferred-stack-boundary=3 Jan Hubicka
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).