Commit 93cac287 by Jakub Jelinek Committed by Jakub Jelinek

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
parent a952487c
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.
......
......@@ -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")])
......
......@@ -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")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment