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

--- Comment #3 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Uros Bizjak <[email protected]>:

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

commit r17-5829-gf2de25778e41d2a6451c798e58e0a6bb5af70765
Author: Uros Bizjak <[email protected]>
Date:   Mon Nov 2 22:50:30 2026 +0100

    i386: Emit ENDBR for cf_check functions that are only called directly

    The cf_check attribute documents that ENDBR is placed at function
    entry, but rest_of_insert_endbr_and_patchable_area skips ENDBR for
    functions where only_called_directly_p is true.  Honor cf_check
    unconditionally; nocf_check still takes precedence.

    Assisted-by: Claude Sonnet 5.5

            PR target/128360

    gcc/ChangeLog:

            * config/i386/i386-features.cc
            (rest_of_insert_endbr_and_patchable_area): Emit ENDBR for
            functions with cf_check attribute even when they are only
            called directly.

    gcc/testsuite/ChangeLog:

            * gcc.target/i386/pr128360-1.c: New test.
            * gcc.target/i386/pr128360-2.c: Ditto.
            * gcc.target/i386/pr128360-3.c: Ditto.

Reply via email to