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

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

https://gcc.gnu.org/g:764f8d4fb762796df9559944dda85ea950530590

commit r16-9889-g764f8d4fb762796df9559944dda85ea950530590
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]

    When adding APX EGPRs, the indirect call path of
    ix86_output_indirect_branch_via_reg tested REX_INT_REGNO_P twice instead
    of REX_INT_REGNO_P || REX2_INT_REGNO_P.  Check REX2_INT_REGNO_P as the
    jmp path in ix86_output_jmp_thunk_or_indirect does, 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.

Reply via email to