This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/67770] [4.9/5/6 Regression] i386: -fshrink-wrap can interact badly with trampolines
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 18 Nov 2015 16:05:00 +0000
- Subject: [Bug target/67770] [4.9/5/6 Regression] i386: -fshrink-wrap can interact badly with trampolines
- Auto-submitted: auto-generated
- References: <bug-67770-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67770
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |bernds at gcc dot gnu.org,
| |jakub at gcc dot gnu.org
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
So, the problem is that ix86_static_chain_on_stack is incompatible with
shrink-wrapping, if that i386 backend flag is on, then the function is either
called directly at function address + 0, or through trampoline at function
address + 1 (i.e. it bypasses the initial pushl %esi instruction).
But that of course relies on the first instruction being always pushl %esi, so
we have to ensure shrink wrapping does not change this.
Unfortunately, there is no target hook right now where the target would state
that shrink wrapping is undesirable for the current function for hard to
discover reasons like the above.
Bernd, do you think it is ok to add a target hook for this? Or try to come up
with some other way how to tell that it is undesirable (some new insn note, ...
?).