aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/i386
diff options
context:
space:
mode:
authorH.J. Lu <hongjiu.lu@intel.com>2018-01-15 22:35:36 +0000
committerH.J. Lu <hjl@gcc.gnu.org>2018-01-15 14:35:36 -0800
commit4a5a0497ba984382955babd44a4d63e0d91a3243 (patch)
tree3cc7f75d3141794847f50b2ffd2c8e5bd9c810de /gcc/config/i386
parent5ca876c398d856b99a3427eabea5a992f328ee2d (diff)
downloadgcc-4a5a0497ba984382955babd44a4d63e0d91a3243.zip
gcc-4a5a0497ba984382955babd44a4d63e0d91a3243.tar.gz
gcc-4a5a0497ba984382955babd44a4d63e0d91a3243.tar.bz2
Don't check ix86_indirect_branch_register for GOT operand
Since GOT_memory_operand and GOT32_symbol_operand are simple pattern matches, don't check ix86_indirect_branch_register here. If needed, -mindirect-branch= will convert indirect branch via GOT slot to a call and return thunk. * config/i386/constraints.md (Bs): Update ix86_indirect_branch_register check. Don't check ix86_indirect_branch_register with GOT_memory_operand. (Bw): Likewise. * config/i386/predicates.md (GOT_memory_operand): Don't check ix86_indirect_branch_register here. (GOT32_symbol_operand): Likewise. From-SVN: r256714
Diffstat (limited to 'gcc/config/i386')
-rw-r--r--gcc/config/i386/constraints.md14
-rw-r--r--gcc/config/i386/predicates.md6
2 files changed, 8 insertions, 12 deletions
diff --git a/gcc/config/i386/constraints.md b/gcc/config/i386/constraints.md
index d6072b9..664e906 100644
--- a/gcc/config/i386/constraints.md
+++ b/gcc/config/i386/constraints.md
@@ -225,20 +225,18 @@
(define_constraint "Bs"
"@internal Sibcall memory operand."
- (ior (and (not (match_test "TARGET_X32
- || ix86_indirect_branch_register"))
+ (ior (and (not (match_test "ix86_indirect_branch_register"))
+ (not (match_test "TARGET_X32"))
(match_operand 0 "sibcall_memory_operand"))
- (and (match_test "TARGET_X32 && Pmode == DImode
- && !ix86_indirect_branch_register")
+ (and (match_test "TARGET_X32 && Pmode == DImode")
(match_operand 0 "GOT_memory_operand"))))
(define_constraint "Bw"
"@internal Call memory operand."
- (ior (and (not (match_test "TARGET_X32
- || ix86_indirect_branch_register"))
+ (ior (and (not (match_test "ix86_indirect_branch_register"))
+ (not (match_test "TARGET_X32"))
(match_operand 0 "memory_operand"))
- (and (match_test "TARGET_X32 && Pmode == DImode
- && !ix86_indirect_branch_register")
+ (and (match_test "TARGET_X32 && Pmode == DImode")
(match_operand 0 "GOT_memory_operand"))))
(define_constraint "Bz"
diff --git a/gcc/config/i386/predicates.md b/gcc/config/i386/predicates.md
index 6ec7ff2..a502657 100644
--- a/gcc/config/i386/predicates.md
+++ b/gcc/config/i386/predicates.md
@@ -695,8 +695,7 @@
;; Return true if OP is a GOT memory operand.
(define_predicate "GOT_memory_operand"
- (and (match_test "!ix86_indirect_branch_register")
- (match_operand 0 "memory_operand"))
+ (match_operand 0 "memory_operand")
{
op = XEXP (op, 0);
return (GET_CODE (op) == CONST
@@ -729,8 +728,7 @@
;; Return true if OP is a 32-bit GOT symbol operand.
(define_predicate "GOT32_symbol_operand"
- (match_test "!ix86_indirect_branch_register
- && GET_CODE (op) == CONST
+ (match_test "GET_CODE (op) == CONST
&& GET_CODE (XEXP (op, 0)) == UNSPEC
&& XINT (XEXP (op, 0), 1) == UNSPEC_GOT"))