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

--- Comment #14 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-13 branch has been updated by Peter Bergner
<berg...@gcc.gnu.org>:

https://gcc.gnu.org/g:77fd352a47137d79e6b7a480503ce4368f13c3e5

commit r13-8940-g77fd352a47137d79e6b7a480503ce4368f13c3e5
Author: Peter Bergner <berg...@linux.ibm.com>
Date:   Wed Jun 19 16:07:29 2024 -0500

    rs6000: ROP - Emit hashst and hashchk insns on Power8 and later [PR114759]

    We currently only emit the ROP-protect hash* insns for Power10, where the
    insns were added to the architecture.  We want to emit them for earlier
    cpus (where they operate as NOPs), so that if those older binaries are
    ever executed on a Power10, then they'll be protected from ROP attacks.
    Binutils accepts hashst and hashchk back to Power8, so change GCC to emit
    them for Power8 and later.  This matches clang's behavior.

    2024-06-19  Peter Bergner  <berg...@linux.ibm.com>

    gcc/
            PR target/114759
            * config/rs6000/rs6000-logue.cc (rs6000_stack_info): Use
TARGET_POWER8.
            (rs6000_emit_prologue): Likewise.
            * config/rs6000/rs6000.md (hashchk): Likewise.
            (hashst): Likewise.
            Fix whitespace.

    gcc/testsuite/
            PR target/114759
            * gcc.target/powerpc/pr114759-2.c: New test.
            * lib/target-supports.exp (rop_ok): Use
            check_effective_target_has_arch_pwr8.

    (cherry picked from commit a05c3d23d1e1c8d2971b123804fc7a61a3561adb)

Reply via email to