diff options
Diffstat (limited to 'gcc/config/i386/predicates.md')
-rw-r--r-- | gcc/config/i386/predicates.md | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/gcc/config/i386/predicates.md b/gcc/config/i386/predicates.md index 2ef1384246e..4ba2e6fbbca 100644 --- a/gcc/config/i386/predicates.md +++ b/gcc/config/i386/predicates.md @@ -968,11 +968,16 @@ ;; a segment override. Defined as a special predicate to allow ;; mode-less const_int operands pass to address_operand. (define_special_predicate "address_no_seg_operand" - (match_operand 0 "address_operand") + (match_test "address_operand (op, VOIDmode)") { struct ix86_address parts; int ok; + if (!CONST_INT_P (op) + && mode != VOIDmode + && GET_MODE (op) != mode) + return false; + ok = ix86_decompose_address (op, &parts); gcc_assert (ok); return parts.seg == SEG_DEFAULT; @@ -981,7 +986,7 @@ ;; Return true if op if a valid base register, displacement or ;; sum of base register and displacement for VSIB addressing. (define_predicate "vsib_address_operand" - (match_operand 0 "address_operand") + (match_test "address_operand (op, VOIDmode)") { struct ix86_address parts; int ok; |