@@ -16798,7 +16798,7 @@ ix86_output_indirect_branch_via_reg (rtx call_op, bool sibcall_p)
{
if (thunk_name != NULL)
{
- if ((REX_INT_REGNO_P (regno) || REX_INT_REGNO_P (regno))
+ if ((REX_INT_REGNO_P (regno) || REX2_INT_REGNO_P (regno))
&& ix86_indirect_branch_cs_prefix)
fprintf (asm_out_file, "\tcs\n");
fprintf (asm_out_file, "\tcall\t");
@@ -1097,7 +1097,7 @@ Enum(indirect_branch) String(thunk-extern) Value(indirect_branch_thunk_extern)
mindirect-branch-cs-prefix
Target Var(ix86_indirect_branch_cs_prefix) Init(0)
-Add CS prefix to call and jmp to indirect thunk with branch target in r8-r15 registers.
+Add CS prefix to call and jmp to indirect thunk with branch target in r8-r15 registers (and r16-r31 when EGPR registers are in use).
mindirect-branch-register
Target Var(ix86_indirect_branch_register) Init(0)
Fix indirect branch CS prefix for EGPR registers. Because of a mistake, they are not prefixed with CS when the indirect-branch-cs-prefix flag is specified. gcc/ChangeLog: * config/i386/i386.cc (ix86_output_indirect_branch_via_reg): fix wrong condition for REX2 registers. * config/i386/i386.opt: Clarify that -mindirect-branch-cs-prefix also applies to EGPR registers when enabled. Signed-off-by: Gregory Kanter <gregorykanter1@gmail.com> --- gcc/config/i386/i386.cc | 2 +- gcc/config/i386/i386.opt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)