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

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

https://gcc.gnu.org/g:71b5e43988229f2311615c45fa4004b3e56b5e28

commit r15-11699-g71b5e43988229f2311615c45fa4004b3e56b5e28
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