diff options
author | Uros Bizjak <uros@gcc.gnu.org> | 2012-10-22 00:12:46 +0200 |
---|---|---|
committer | Uros Bizjak <uros@gcc.gnu.org> | 2012-10-22 00:12:46 +0200 |
commit | cab54dfa3ad330dd2ccb876e85112cc4363786d5 (patch) | |
tree | b7154eb94cb5fcc8262e1ed94e79ec04396f1824 /gcc/config/i386/predicates.md | |
parent | 84cac7eff72290d1b2a57c75df602a02ffd2f56e (diff) | |
download | gcc-cab54dfa3ad330dd2ccb876e85112cc4363786d5.zip gcc-cab54dfa3ad330dd2ccb876e85112cc4363786d5.tar.gz gcc-cab54dfa3ad330dd2ccb876e85112cc4363786d5.tar.bz2 |
i386-protos.h (memory_address_length): Add new bool argument.
* config/i386/i386-protos.h (memory_address_length): Add new bool
argument. Update all uses.
* config/i386/i386.c (memory_address_length): If not LEA insn, then
add length of addr32 prefix based on mode of base or index register.
(ix86_attr_length_address_default) <TYPE_LEA>: Do not handle SImode
addresses here. Update call to memory_address_length.
(ix86_print_address_operand): Use SImode_address_operand predicate.
* config/i386/predicates.md (SImode_address_operand): New.
* config/i386/i386.md (lea<mode>): Use SImode_address_operand
to calculate "mode" attribute. Use SImode_address_operand predicate
instead of open-coding accepted RTX codes.
From-SVN: r192660
Diffstat (limited to 'gcc/config/i386/predicates.md')
-rw-r--r-- | gcc/config/i386/predicates.md | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/config/i386/predicates.md b/gcc/config/i386/predicates.md index 6cf5651..4e5c17d 100644 --- a/gcc/config/i386/predicates.md +++ b/gcc/config/i386/predicates.md @@ -813,6 +813,10 @@ return parts.seg == SEG_DEFAULT; }) +;; Return true for RTX codes that force SImode address. +(define_predicate "SImode_address_operand" + (match_code "subreg,zero_extend,and")) + ;; 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" @@ -982,7 +986,7 @@ ;; by the modRM array. (define_predicate "long_memory_operand" (and (match_operand 0 "memory_operand") - (match_test "memory_address_length (op)"))) + (match_test "memory_address_length (op, false)"))) ;; Return true if OP is a comparison operator that can be issued by fcmov. (define_predicate "fcmov_comparison_operator" |