Commit 7482c470 by Uros Bizjak Committed by Uros Bizjak

i386.md (*zero_extendsidi2): Merge with *zero_extendsidi2_rex64.

	* config/i386/i386.md (*zero_extendsidi2): Merge with
	*zero_extendsidi2_rex64.  Use x64 and nox64 isa attributes.
	* config/i386/predicates.md (x86_64_zext_operand): Rename from
	x86_64_zext_general_operand.  Use nonimmediate_operand on 32bit
	targets.  Clarify comment.

From-SVN: r197056
parent 4a53743e
2013-03-25 Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386.md (*zero_extendsidi2): Merge with
*zero_extendsidi2_rex64. Use x64 and nox64 isa attributes.
* config/i386/predicates.md (x86_64_zext_operand): Rename from
x86_64_zext_general_operand. Use nonimmediate_operand on 32bit
targets. Clarify comment.
2013-03-25 Martin Jambor <mjambor@suse.cz> 2013-03-25 Martin Jambor <mjambor@suse.cz>
* ipa-prop.c (ipa_write_jump_function): Stream simple and aritmetic * ipa-prop.c (ipa_write_jump_function): Stream simple and aritmetic
......
...@@ -3135,13 +3135,13 @@ ...@@ -3135,13 +3135,13 @@
[(set (match_operand:DI 0 "nonimmediate_operand") [(set (match_operand:DI 0 "nonimmediate_operand")
(zero_extend:DI (match_operand:SI 1 "nonimmediate_operand")))]) (zero_extend:DI (match_operand:SI 1 "nonimmediate_operand")))])
(define_insn "*zero_extendsidi2_rex64" (define_insn "*zero_extendsidi2"
[(set (match_operand:DI 0 "nonimmediate_operand" [(set (match_operand:DI 0 "nonimmediate_operand"
"=r ,o,?*Ym,?*y,?*Yi,?*x") "=r,?r,?o,r ,o,?*Ym,?*y,?*Yi,?*x")
(zero_extend:DI (zero_extend:DI
(match_operand:SI 1 "x86_64_zext_general_operand" (match_operand:SI 1 "x86_64_zext_operand"
"rmWz,0,r ,m ,r ,m")))] "0 ,rm,r ,rmWz,0,r ,m ,r ,m")))]
"TARGET_64BIT" ""
{ {
switch (get_attr_type (insn)) switch (get_attr_type (insn))
{ {
...@@ -3164,29 +3164,39 @@ ...@@ -3164,29 +3164,39 @@
gcc_unreachable (); gcc_unreachable ();
} }
} }
[(set_attr "type" "imovx,multi,mmxmov,mmxmov,ssemov,ssemov") [(set (attr "isa")
(set_attr "prefix" "orig,*,orig,orig,maybe_vex,maybe_vex") (cond [(eq_attr "alternative" "0,1,2")
(set_attr "prefix_0f" "0,*,*,*,*,*") (const_string "nox64")
(set_attr "mode" "SI,SI,DI,DI,TI,TI")]) (eq_attr "alternative" "3")
(const_string "x64")
(define_insn "*zero_extendsidi2" (eq_attr "alternative" "8")
[(set (match_operand:DI 0 "nonimmediate_operand" (const_string "sse2")
"=ro,?r,?o,?*Ym,?*y,?*Yi,?*x") ]
(zero_extend:DI (match_operand:SI 1 "nonimmediate_operand" (const_string "*")))
"0 ,rm,r ,r ,m ,r ,m")))] (set (attr "type")
"!TARGET_64BIT" (cond [(eq_attr "alternative" "0,1,2,4")
"@ (const_string "multi")
# (eq_attr "alternative" "5,6")
# (const_string "mmxmov")
# (eq_attr "alternative" "7,8")
movd\t{%1, %0|%0, %1} (const_string "ssemov")
movd\t{%1, %0|%0, %1} ]
%vmovd\t{%1, %0|%0, %1} (const_string "imovx")))
%vmovd\t{%1, %0|%0, %1}" (set (attr "prefix")
[(set_attr "isa" "*,*,*,*,*,*,sse2") (if_then_else (eq_attr "type" "ssemov")
(set_attr "type" "multi,multi,multi,mmxmov,mmxmov,ssemov,ssemov") (const_string "maybe_vex")
(set_attr "prefix" "*,*,*,orig,orig,maybe_vex,maybe_vex") (const_string "orig")))
(set_attr "mode" "SI,SI,SI,DI,DI,TI,TI")]) (set (attr "prefix_0f")
(if_then_else (eq_attr "type" "imovx")
(const_string "0")
(const_string "*")))
(set (attr "mode")
(cond [(eq_attr "alternative" "5,6")
(const_string "DI")
(eq_attr "alternative" "7,8")
(const_string "TI")
]
(const_string "SI")))])
(define_split (define_split
[(set (match_operand:DI 0 "memory_operand") [(set (match_operand:DI 0 "memory_operand")
......
...@@ -311,15 +311,15 @@ ...@@ -311,15 +311,15 @@
(match_operand 0 "x86_64_immediate_operand")) (match_operand 0 "x86_64_immediate_operand"))
(match_operand 0 "general_operand"))) (match_operand 0 "general_operand")))
;; Return true if OP is general operand representable on x86_64 ;; Return true if OP is representable on x86_64 as zero-extended operand.
;; as zero extended constant. This predicate is used in zero-extending ;; This predicate is used in zero-extending conversion operations that
;; conversion operations that require non-VOIDmode immediate operands. ;; require non-VOIDmode immediate operands.
(define_predicate "x86_64_zext_general_operand" (define_predicate "x86_64_zext_operand"
(if_then_else (match_test "TARGET_64BIT") (if_then_else (match_test "TARGET_64BIT")
(ior (match_operand 0 "nonimmediate_operand") (ior (match_operand 0 "nonimmediate_operand")
(and (match_operand 0 "x86_64_zext_immediate_operand") (and (match_operand 0 "x86_64_zext_immediate_operand")
(match_test "GET_MODE (op) != VOIDmode"))) (match_test "GET_MODE (op) != VOIDmode")))
(match_operand 0 "general_operand"))) (match_operand 0 "nonimmediate_operand")))
;; Return true if OP is general operand representable on x86_64 ;; Return true if OP is general operand representable on x86_64
;; as either sign extended or zero extended constant. ;; as either sign extended or zero extended constant.
......
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