--- Comment #7 from Andreas Krebbel <krebbel at gcc dot> ---
Author: krebbel
Date: Thu Oct 10 07:56:25 2019
New Revision: 276790

S/390: PR91035 Fix call to __morestack

For the call to __morestack we use a special ABI in the S/390 back-end
which requires us to emit a parameter block to the .rodata section.
It contains the label whereto __morestack needs to return.  The
parameter block needs to be explicit in RTL since we also need to take
the address of it loaded into r1 in order to pass its address to
__morestack.  In order to express correctly what __morestack does its
RTX also contained the return label. Hence we had the return label to
occur twice in the insn stream.  This is problematic when it comes to
redirecting edges.  The correlation between these two occurrences of
the label cannot be expressed so when doing a redirect only the label
in the jump RTX gets modified while the parameter block label stays as

The patch avoids having two instancs of the label by merging the
parameter block generation and the __morestack call RTX into one. By
doing this I could also get rid of the unspec which was required for
the parameter block generation so far.


2019-10-10  Andreas Krebbel  <>

        PR target/91035
        * config/s390/s390-protos.h (s390_output_split_stack_data): Add
        * config/s390/ (UNSPECV_SPLIT_STACK_DATA): Remove.
        ("split_stack_data", "split_stack_call")
        ("split_stack_call_<mode>", "split_stack_cond_call")
        ("split_stack_cond_call_<mode>"): Remove.
        ("@split_stack_call<mode>", "@split_stack_cond_call<mode>"): New
        insn definition.
        * config/s390/s390.c (s390_output_split_stack_data): New function.
        (s390_expand_split_stack_prologue): Use the merged expander.


Reply via email to