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

--- Comment #5 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-14 branch has been updated by Hongyu Wang
<[email protected]>:

https://gcc.gnu.org/g:6ef26afa7f06f9db3636b0907ad4928c25f2b637

commit r14-12992-g6ef26afa7f06f9db3636b0907ad4928c25f2b637
Author: Hongyu Wang <[email protected]>
Date:   Tue Nov 3 11:10:20 2026 +0800

    i386: Fix REX2 register check for CS-prefixed indirect calls [PR128388]

    The indirect call path of ix86_output_indirect_branch_via_reg tested
    REX_INT_REGNO_P twice. Fix it to test REX2_INT_REGNO_P so
    -mindirect-branch-cs-prefix also adds CS for calls via r16-r31 thunks.

    gcc/ChangeLog:

            PR target/128388
            * config/i386/i386.cc (ix86_output_indirect_branch_via_reg):
            Check REX2_INT_REGNO_P instead of REX_INT_REGNO_P twice.

    gcc/testsuite/ChangeLog:

            PR target/128388
            * gcc.target/i386/pr128388.c: New test.

    (cherry picked from commit 55559303b9a6ecaf370e6edf6854c3e747f19a28)

Reply via email to