diff options
author | Jakub Jelinek <jakub@redhat.com> | 2009-05-21 15:32:47 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2009-05-21 15:32:47 +0200 |
commit | 93cac287cb05b729da30116dc621dc0dd0164bed (patch) | |
tree | 462b35c2f312c8549bcf1cdb37764c922a222bda | |
parent | a952487c45d701416fc353fef8eb540c9909e399 (diff) | |
download | gcc-93cac287cb05b729da30116dc621dc0dd0164bed.zip gcc-93cac287cb05b729da30116dc621dc0dd0164bed.tar.gz gcc-93cac287cb05b729da30116dc621dc0dd0164bed.tar.bz2 |
i386.md (adddi_4_rex64, [...]): For operand2 -128 override length_immediate attribute to 1.
* config/i386/i386.md (adddi_4_rex64, addsi_4, addhi_4): For
operand2 -128 override length_immediate attribute to 1.
* config/i386/predicates.md (constm128_operand): New predicate.
From-SVN: r147767
-rw-r--r-- | gcc/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/config/i386/i386.md | 15 | ||||
-rw-r--r-- | gcc/config/i386/predicates.md | 5 |
3 files changed, 24 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 29fd61b..3c4c882 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,9 @@ 2009-05-21 Jakub Jelinek <jakub@redhat.com> + * config/i386/i386.md (adddi_4_rex64, addsi_4, addhi_4): For + operand2 -128 override length_immediate attribute to 1. + * config/i386/predicates.md (constm128_operand): New predicate. + * config/i386/i386.c (memory_address_length): Handle %r12 the same as %rsp and %r13 the same as %rbp. For %rsp and %rbp also check REGNO. diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index 6d439f0..596f770 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -6648,6 +6648,11 @@ (if_then_else (match_operand:DI 2 "incdec_operand" "") (const_string "incdec") (const_string "alu"))) + (set (attr "length_immediate") + (if_then_else + (and (eq_attr "type" "alu") (match_operand 2 "constm128_operand" "")) + (const_string "1") + (const_string "*"))) (set_attr "mode" "DI")]) (define_insn "*adddi_5_rex64" @@ -7114,6 +7119,11 @@ (if_then_else (match_operand:SI 2 "incdec_operand" "") (const_string "incdec") (const_string "alu"))) + (set (attr "length_immediate") + (if_then_else + (and (eq_attr "type" "alu") (match_operand 2 "constm128_operand" "")) + (const_string "1") + (const_string "*"))) (set_attr "mode" "SI")]) (define_insn "*addsi_5" @@ -7397,6 +7407,11 @@ (if_then_else (match_operand:HI 2 "incdec_operand" "") (const_string "incdec") (const_string "alu"))) + (set (attr "length_immediate") + (if_then_else + (and (eq_attr "type" "alu") (match_operand 2 "constm128_operand" "")) + (const_string "1") + (const_string "*"))) (set_attr "mode" "SI")]) diff --git a/gcc/config/i386/predicates.md b/gcc/config/i386/predicates.md index fc89ec4..c9921d6 100644 --- a/gcc/config/i386/predicates.md +++ b/gcc/config/i386/predicates.md @@ -587,6 +587,11 @@ (and (match_code "const_int") (match_test "INTVAL (op) == 128"))) +;; Match exactly -128. +(define_predicate "constm128_operand" + (and (match_code "const_int") + (match_test "INTVAL (op) == -128"))) + ;; Match 2, 4, or 8. Used for leal multiplicands. (define_predicate "const248_operand" (match_code "const_int") |