+2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
+
+ * config/i386/constraints.md (Bs): Replace
+ ix86_indirect_branch_thunk_register with
+ ix86_indirect_branch_register.
+ (Bw): Likewise.
+ * config/i386/i386.md (indirect_jump): Likewise.
+ (tablejump): Likewise.
+ (*sibcall_memory): Likewise.
+ (*sibcall_value_memory): Likewise.
+ Peepholes of indirect call and jump via memory: Likewise.
+ * config/i386/i386.opt: Likewise.
+ * config/i386/predicates.md (indirect_branch_operand): Likewise.
+ (GOT_memory_operand): Likewise.
+ (call_insn_operand): Likewise.
+ (sibcall_insn_operand): Likewise.
+ (GOT32_symbol_operand): Likewise.
+
2018-01-15 Jakub Jelinek <jakub@redhat.com>
PR middle-end/83837
(define_constraint "Bs"
"@internal Sibcall memory operand."
(ior (and (not (match_test "TARGET_X32
- || ix86_indirect_branch_thunk_register"))
+ || ix86_indirect_branch_register"))
(match_operand 0 "sibcall_memory_operand"))
(and (match_test "TARGET_X32 && Pmode == DImode
- && !ix86_indirect_branch_thunk_register")
+ && !ix86_indirect_branch_register")
(match_operand 0 "GOT_memory_operand"))))
(define_constraint "Bw"
"@internal Call memory operand."
(ior (and (not (match_test "TARGET_X32
- || ix86_indirect_branch_thunk_register"))
+ || ix86_indirect_branch_register"))
(match_operand 0 "memory_operand"))
(and (match_test "TARGET_X32 && Pmode == DImode
- && !ix86_indirect_branch_thunk_register")
+ && !ix86_indirect_branch_register")
(match_operand 0 "GOT_memory_operand"))))
(define_constraint "Bz"
[(set (pc) (match_operand 0 "indirect_branch_operand"))]
""
{
- if (TARGET_X32 || ix86_indirect_branch_thunk_register)
+ if (TARGET_X32 || ix86_indirect_branch_register)
operands[0] = convert_memory_address (word_mode, operands[0]);
cfun->machine->has_local_indirect_jump = true;
})
OPTAB_DIRECT);
}
- if (TARGET_X32 || ix86_indirect_branch_thunk_register)
+ if (TARGET_X32 || ix86_indirect_branch_register)
operands[0] = convert_memory_address (word_mode, operands[0]);
cfun->machine->has_local_indirect_jump = true;
})
[(call (mem:QI (match_operand:W 0 "memory_operand" "m"))
(match_operand 1))
(unspec [(const_int 0)] UNSPEC_PEEPSIB)]
- "!TARGET_X32 && !ix86_indirect_branch_thunk_register"
+ "!TARGET_X32 && !ix86_indirect_branch_register"
"* return ix86_output_call_insn (insn, operands[0]);"
[(set_attr "type" "call")])
(call (mem:QI (match_dup 0))
(match_operand 3))]
"!TARGET_X32
- && !ix86_indirect_branch_thunk_register
+ && !ix86_indirect_branch_register
&& SIBLING_CALL_P (peep2_next_insn (1))
&& !reg_mentioned_p (operands[0],
CALL_INSN_FUNCTION_USAGE (peep2_next_insn (1)))"
(call (mem:QI (match_dup 0))
(match_operand 3))]
"!TARGET_X32
- && !ix86_indirect_branch_thunk_register
+ && !ix86_indirect_branch_register
&& SIBLING_CALL_P (peep2_next_insn (2))
&& !reg_mentioned_p (operands[0],
CALL_INSN_FUNCTION_USAGE (peep2_next_insn (2)))"
(match_operand:W 1 "memory_operand"))
(set (pc) (match_dup 0))]
"!TARGET_X32
- && !ix86_indirect_branch_thunk_register
+ && !ix86_indirect_branch_register
&& peep2_reg_dead_p (2, operands[0])"
[(set (pc) (match_dup 1))])
(call (mem:QI (match_operand:W 1 "memory_operand" "m"))
(match_operand 2)))
(unspec [(const_int 0)] UNSPEC_PEEPSIB)]
- "!TARGET_X32 && !ix86_indirect_branch_thunk_register"
+ "!TARGET_X32 && !ix86_indirect_branch_register"
"* return ix86_output_call_insn (insn, operands[1]);"
[(set_attr "type" "callv")])
(call (mem:QI (match_dup 0))
(match_operand 3)))]
"!TARGET_X32
- && !ix86_indirect_branch_thunk_register
+ && !ix86_indirect_branch_register
&& SIBLING_CALL_P (peep2_next_insn (1))
&& !reg_mentioned_p (operands[0],
CALL_INSN_FUNCTION_USAGE (peep2_next_insn (1)))"
(call (mem:QI (match_dup 0))
(match_operand 3)))]
"!TARGET_X32
- && !ix86_indirect_branch_thunk_register
+ && !ix86_indirect_branch_register
&& SIBLING_CALL_P (peep2_next_insn (2))
&& !reg_mentioned_p (operands[0],
CALL_INSN_FUNCTION_USAGE (peep2_next_insn (2)))"
Enum(indirect_branch) String(thunk-extern) Value(indirect_branch_thunk_extern)
mindirect-branch-register
-Target Report Var(ix86_indirect_branch_thunk_register) Init(0)
+Target Report Var(ix86_indirect_branch_register) Init(0)
Force indirect call and jump via register.
(define_predicate "indirect_branch_operand"
(ior (match_operand 0 "register_operand")
(and (not (match_test "TARGET_X32
- || ix86_indirect_branch_thunk_register"))
+ || ix86_indirect_branch_register"))
(match_operand 0 "memory_operand"))))
;; Return true if OP is a memory operands that can be used in sibcalls.
;; Return true if OP is a GOT memory operand.
(define_predicate "GOT_memory_operand"
- (and (match_test "!ix86_indirect_branch_thunk_register")
+ (and (match_test "!ix86_indirect_branch_register")
(match_operand 0 "memory_operand"))
{
op = XEXP (op, 0);
(op, mode == VOIDmode ? mode : Pmode)")
(match_operand 0 "call_register_no_elim_operand")
(ior (and (not (match_test "TARGET_X32
- || ix86_indirect_branch_thunk_register"))
+ || ix86_indirect_branch_register"))
(match_operand 0 "memory_operand"))
(and (match_test "TARGET_X32 && Pmode == DImode
- && !ix86_indirect_branch_thunk_register")
+ && !ix86_indirect_branch_register")
(match_operand 0 "GOT_memory_operand")))))
;; Similarly, but for tail calls, in which we cannot allow memory references.
(op, mode == VOIDmode ? mode : Pmode)")
(match_operand 0 "register_no_elim_operand")
(ior (and (not (match_test "TARGET_X32
- || ix86_indirect_branch_thunk_register"))
+ || ix86_indirect_branch_register"))
(match_operand 0 "sibcall_memory_operand"))
(and (match_test "TARGET_X32 && Pmode == DImode
- && !ix86_indirect_branch_thunk_register")
+ && !ix86_indirect_branch_register")
(match_operand 0 "GOT_memory_operand")))))
;; Return true if OP is a 32-bit GOT symbol operand.
(define_predicate "GOT32_symbol_operand"
- (match_test "!ix86_indirect_branch_thunk_register
+ (match_test "!ix86_indirect_branch_register
&& GET_CODE (op) == CONST
&& GET_CODE (XEXP (op, 0)) == UNSPEC
&& XINT (XEXP (op, 0), 1) == UNSPEC_GOT"))