[Bug target/63890] [4.9/5/6 regression] Compiling trivial program with -O -p leads to misaligned stack
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63890 --- Comment #30 from Jeffrey A. Law --- Author: law Date: Wed Mar 30 03:57:30 2016 New Revision: 234545 URL: https://gcc.gnu.org/viewcvs?rev=234545=gcc=rev Log: PR target/63890 * config/i386/i386.h (ACCUMULATE_OUTGOING_ARGS): Use when profiling and TARGET_MACHO. * tree-vrp.c (register_edge_assert_for_2): For NAME != CST1 Modified: trunk/gcc/ChangeLog trunk/gcc/config/i386/i386.h
[Bug target/63890] [4.9/5/6 regression] Compiling trivial program with -O -p leads to misaligned stack
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63890 Jeffrey A. Law changed: What|Removed |Added CC||law at redhat dot com --- Comment #29 from Jeffrey A. Law --- I've been able to confirm this on an older mac here. I've got a baseline bootstrap & test running and will test the patch from c#9 once the baseline is complete.
[Bug target/63890] [4.9/5/6 regression] Compiling trivial program with -O -p leads to misaligned stack
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63890 --- Comment #27 from Dominique d'Humieres --- > Certainly adding TARGET_MACHO is Ok by me. I don't think this is the problem. I have reapplied the patch in comment 12 for config/i386/darwin.h and --- ../_clean/gcc/config/i386/i386.c2016-01-13 19:03:17.0 +0100 +++ gcc/config/i386/i386.c 2016-01-14 20:04:06.0 +0100 @@ -10168,6 +10168,14 @@ ix86_va_start (tree valist, rtx nextarg) pop_topmost_sequence (); } } + /* Be sure we get stack aligned for mcount call. */ + /* else if (TARGET_MACHO && crtl->profile && flag_fentry) */ + else if (TARGET_MACHO && crtl->profile) +{ + crtl->preferred_stack_boundary = PREFERRED_STACK_BOUNDARY; + if (crtl->stack_alignment_needed < PREFERRED_STACK_BOUNDARY) + crtl->stack_alignment_needed = PREFERRED_STACK_BOUNDARY; +} /* Only 64bit target needs something special. */ if (is_va_list_char_pointer (TREE_TYPE (valist))) and confirm the results reported in comment 20: three tests fixed and seven new failures.
[Bug target/63890] [4.9/5/6 regression] Compiling trivial program with -O -p leads to misaligned stack
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63890 Bernd Schmidt changed: What|Removed |Added CC||bernds at gcc dot gnu.org --- Comment #28 from Bernd Schmidt --- (In reply to Dominique d'Humieres from comment #27) > > Certainly adding TARGET_MACHO is Ok by me. > > I don't think this is the problem. I have reapplied the patch in comment 12 > for config/i386/darwin.h and > > and confirm the results reported in comment 20: three tests fixed and seven > new failures. Please test the patch from comment 9. I agree with rth that this looks like the right solution if it works.
[Bug target/63890] [4.9/5/6 regression] Compiling trivial program with -O -p leads to misaligned stack
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63890 --- Comment #25 from Jan Hubicka --- > Dominique, can you please test the #c9 patch with the #c22 improvement and if > it works, submit to gcc-patches? It would be really nice to test some bigger codebase (like bootstrap with -p), not just running the testsuite. Honza
[Bug target/63890] [4.9/5/6 regression] Compiling trivial program with -O -p leads to misaligned stack
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63890 --- Comment #23 from Jan Hubicka --- If comment 9 patch works on a bigger codebase I am definitly happy about it.
[Bug target/63890] [4.9/5/6 regression] Compiling trivial program with -O -p leads to misaligned stack
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63890 --- Comment #26 from mrs at gcc dot gnu.org --- Certainly adding TARGET_MACHO is Ok by me.
[Bug target/63890] [4.9/5/6 regression] Compiling trivial program with -O -p leads to misaligned stack
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63890 --- Comment #24 from Jakub Jelinek --- Dominique, can you please test the #c9 patch with the #c22 improvement and if it works, submit to gcc-patches?
[Bug target/63890] [4.9/5/6 regression] Compiling trivial program with -O -p leads to misaligned stack
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63890 --- Comment #22 from Richard Henderson --- I believe that Honza is over-thinking this in #c12. Mike reports that the patch in #c9 works, which makes sense to me based on where darwin emits its profiler call. The patch could be improved to note the darwin-specific nature of the patch. E.g. (TARGET_MACHO && crtl->profile) but otherwise I think it's fine.
[Bug target/63890] [4.9/5/6 regression] Compiling trivial program with -O -p leads to misaligned stack
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63890 Andrew Pinski changed: What|Removed |Added Severity|major |normal
[Bug target/63890] [4.9/5/6 regression] Compiling trivial program with -O -p leads to misaligned stack
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63890 --- Comment #21 from Jakub Jelinek jakub at gcc dot gnu.org --- GCC 4.9.3 has been released.
[Bug target/63890] [4.9/5/6 regression] Compiling trivial program with -O -p leads to misaligned stack
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63890 Jakub Jelinek jakub at gcc dot gnu.org changed: What|Removed |Added Target Milestone|4.9.3 |4.9.4