aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorUros Bizjak <ubizjak@gmail.com>2013-03-25 19:09:36 +0100
committerUros Bizjak <uros@gcc.gnu.org>2013-03-25 19:09:36 +0100
commit7482c47076c6396485beb2b7953a773faca4b20c (patch)
tree43172be3d73d49f5a17b093390d36ec0d9bdab3d /gcc
parent4a53743eda72f3cf49c3aadb2ac8fd5b3f105c37 (diff)
downloadgcc-7482c47076c6396485beb2b7953a773faca4b20c.zip
gcc-7482c47076c6396485beb2b7953a773faca4b20c.tar.gz
gcc-7482c47076c6396485beb2b7953a773faca4b20c.tar.bz2
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/config/i386/i386.md66
-rw-r--r--gcc/config/i386/predicates.md10
3 files changed, 51 insertions, 33 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 044b5f6..9bdf1e5 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,11 @@
+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>
* ipa-prop.c (ipa_write_jump_function): Stream simple and aritmetic
diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md
index 475da37..6a95e01 100644
--- a/gcc/config/i386/i386.md
+++ b/gcc/config/i386/i386.md
@@ -3135,13 +3135,13 @@
[(set (match_operand:DI 0 "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"
- "=r ,o,?*Ym,?*y,?*Yi,?*x")
+ "=r,?r,?o,r ,o,?*Ym,?*y,?*Yi,?*x")
(zero_extend:DI
- (match_operand:SI 1 "x86_64_zext_general_operand"
- "rmWz,0,r ,m ,r ,m")))]
- "TARGET_64BIT"
+ (match_operand:SI 1 "x86_64_zext_operand"
+ "0 ,rm,r ,rmWz,0,r ,m ,r ,m")))]
+ ""
{
switch (get_attr_type (insn))
{
@@ -3164,29 +3164,39 @@
gcc_unreachable ();
}
}
- [(set_attr "type" "imovx,multi,mmxmov,mmxmov,ssemov,ssemov")
- (set_attr "prefix" "orig,*,orig,orig,maybe_vex,maybe_vex")
- (set_attr "prefix_0f" "0,*,*,*,*,*")
- (set_attr "mode" "SI,SI,DI,DI,TI,TI")])
-
-(define_insn "*zero_extendsidi2"
- [(set (match_operand:DI 0 "nonimmediate_operand"
- "=ro,?r,?o,?*Ym,?*y,?*Yi,?*x")
- (zero_extend:DI (match_operand:SI 1 "nonimmediate_operand"
- "0 ,rm,r ,r ,m ,r ,m")))]
- "!TARGET_64BIT"
- "@
- #
- #
- #
- movd\t{%1, %0|%0, %1}
- movd\t{%1, %0|%0, %1}
- %vmovd\t{%1, %0|%0, %1}
- %vmovd\t{%1, %0|%0, %1}"
- [(set_attr "isa" "*,*,*,*,*,*,sse2")
- (set_attr "type" "multi,multi,multi,mmxmov,mmxmov,ssemov,ssemov")
- (set_attr "prefix" "*,*,*,orig,orig,maybe_vex,maybe_vex")
- (set_attr "mode" "SI,SI,SI,DI,DI,TI,TI")])
+ [(set (attr "isa")
+ (cond [(eq_attr "alternative" "0,1,2")
+ (const_string "nox64")
+ (eq_attr "alternative" "3")
+ (const_string "x64")
+ (eq_attr "alternative" "8")
+ (const_string "sse2")
+ ]
+ (const_string "*")))
+ (set (attr "type")
+ (cond [(eq_attr "alternative" "0,1,2,4")
+ (const_string "multi")
+ (eq_attr "alternative" "5,6")
+ (const_string "mmxmov")
+ (eq_attr "alternative" "7,8")
+ (const_string "ssemov")
+ ]
+ (const_string "imovx")))
+ (set (attr "prefix")
+ (if_then_else (eq_attr "type" "ssemov")
+ (const_string "maybe_vex")
+ (const_string "orig")))
+ (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
[(set (match_operand:DI 0 "memory_operand")
diff --git a/gcc/config/i386/predicates.md b/gcc/config/i386/predicates.md
index d098dc5..b3b07db 100644
--- a/gcc/config/i386/predicates.md
+++ b/gcc/config/i386/predicates.md
@@ -311,15 +311,15 @@
(match_operand 0 "x86_64_immediate_operand"))
(match_operand 0 "general_operand")))
-;; Return true if OP is general operand representable on x86_64
-;; as zero extended constant. This predicate is used in zero-extending
-;; conversion operations that require non-VOIDmode immediate operands.
-(define_predicate "x86_64_zext_general_operand"
+;; Return true if OP is representable on x86_64 as zero-extended operand.
+;; This predicate is used in zero-extending conversion operations that
+;; require non-VOIDmode immediate operands.
+(define_predicate "x86_64_zext_operand"
(if_then_else (match_test "TARGET_64BIT")
(ior (match_operand 0 "nonimmediate_operand")
(and (match_operand 0 "x86_64_zext_immediate_operand")
(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
;; as either sign extended or zero extended constant.