diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2021-10-27 06:27:15 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2021-11-18 08:25:11 -0800 |
commit | 2196a681d7810ad8b227bf983f38ba716620545e (patch) | |
tree | 3da7f11755f19cb140029786544dfb10e45e34c3 /gcc/ipa-modref.c | |
parent | ca243ada71656651a8753e88164a1f0f019be1c3 (diff) | |
download | gcc-2196a681d7810ad8b227bf983f38ba716620545e.zip gcc-2196a681d7810ad8b227bf983f38ba716620545e.tar.gz gcc-2196a681d7810ad8b227bf983f38ba716620545e.tar.bz2 |
x86: Add -mindirect-branch-cs-prefix
Add -mindirect-branch-cs-prefix to add CS prefix to call and jmp to
indirect thunk with branch target in r8-r15 registers so that the call
and jmp instruction length is 6 bytes to allow them to be replaced with
"lfence; call *%r8-r15" or "lfence; jmp *%r8-r15" at run-time.
gcc/
PR target/102952
* config/i386/i386.c (ix86_output_jmp_thunk_or_indirect): Emit
CS prefix for -mindirect-branch-cs-prefix.
(ix86_output_indirect_branch_via_reg): Likewise.
* config/i386/i386.opt: Add -mindirect-branch-cs-prefix.
* doc/invoke.texi: Document -mindirect-branch-cs-prefix.
gcc/testsuite/
PR target/102952
* gcc.target/i386/indirect-thunk-cs-prefix-1.c: New test.
* gcc.target/i386/indirect-thunk-cs-prefix-2.c: Likewise.
Diffstat (limited to 'gcc/ipa-modref.c')
0 files changed, 0 insertions, 0 deletions