https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104117

--- Comment #25 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Iain D Sandoe <ia...@gcc.gnu.org>:

https://gcc.gnu.org/g:f1b3e3853329b58fb2e50c17487df2ecbc4a5608

commit r12-7486-gf1b3e3853329b58fb2e50c17487df2ecbc4a5608
Author: Iain Sandoe <i...@sandoe.co.uk>
Date:   Wed Feb 23 13:53:44 2022 +0000

    LRA, rs6000, Darwin: Revise lo_sum use for forced constants [PR104117].

    Follow up discussion to the initial patch for this PR identified that it is
    preferable to avoid the LRA change, and arrange for the target to reject
the
    hi and lo_sum selections when presented with an invalid address.

    We split the Darwin high/low selectors into two:
     1. One that handles non-PIC addresses (kernel mode, mdynamic-no-pic).
     2. One that handles PIC addresses and rejects SYMBOL_REFs unless they are
        suitably wrapped in the MACHOPIC_OFFSET unspec.

    The second case is handled by providing a new predicate (macho_pic_address)
    that checks the requirements.

    Signed-off-by: Iain Sandoe <i...@sandoe.co.uk>

            PR target/104117

    gcc/ChangeLog:

            * config/rs6000/darwin.md (@machopic_high_<mode>): New.
            (@machopic_low_<mode>): New.
            * config/rs6000/predicates.md (macho_pic_address): New.
            * config/rs6000/rs6000.cc (rs6000_legitimize_address): Do not
            apply the TLS processing to Darwin.
            * lra-constraints.cc (process_address_1): Revert the changes
            in r12-7209.

Reply via email to