This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/67770] [4.9/5/6 Regression] i386: -fshrink-wrap can interact badly with trampolines


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, ...
?).

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]