h8300.md (zero_extendqihi2): Changes to define_expand to accomodate target-specific...
authorKazu Hirata <kazu@hxi.com>
Thu, 30 Aug 2001 17:17:17 +0000 (17:17 +0000)
committerKazu Hirata <kazu@gcc.gnu.org>
Thu, 30 Aug 2001 17:17:17 +0000 (17:17 +0000)
* config/h8300/h8300.md (zero_extendqihi2): Changes to
define_expand to accomodate target-specific attributes.
(anonymous zero_extendqihi2 patterns): New.

From-SVN: r45290

gcc/ChangeLog
gcc/config/h8300/h8300.md

index 735a3a1f49f10b71d9ce43e95bf8d9c38736e8c9..e0661aade98baaf93c552e99a304ec575f05f47a 100644 (file)
@@ -1,3 +1,9 @@
+2001-08-30  Kazu Hirata  <kazu@hxi.com>
+
+       * config/h8300/h8300.md (zero_extendqihi2): Changes to
+       define_expand to accomodate target-specific attributes.
+       (anonymous zero_extendqihi2 patterns): New.
+
 Thu Aug 30 18:10:56 2001  J"orn Rennecke <amylaar@redhat.com>
 
        * h8300.md (*andorhi3): New pattern.
index 8fb32711e2080cdc25526fa8c4193a695b97f7e4..eb7dc775c71c71b15204de8e0e6e4d6f586d96bc 100644 (file)
 ;; EXTEND INSTRUCTIONS
 ;; ----------------------------------------------------------------------
 
-(define_insn "zero_extendqihi2"
+(define_expand "zero_extendqihi2"
+  [(set (match_operand:HI 0 "register_operand" "")
+       (zero_extend:HI (match_operand:QI 1 "general_operand_src" "")))]
+  ""
+  "")
+
+(define_insn ""
   [(set (match_operand:HI 0 "register_operand" "=r,r")
        (zero_extend:HI (match_operand:QI 1 "general_operand_src" "0,g>")))]
-  ""
+  "TARGET_H8300"
   "@
   mov.b        #0,%t0
   mov.b        %R1,%s0\;mov.b  #0,%t0"
   [(set_attr "length" "2,10")
    (set_attr "cc" "clobber,clobber")])
 
+(define_insn ""
+  [(set (match_operand:HI 0 "register_operand" "=r,r")
+       (zero_extend:HI (match_operand:QI 1 "general_operand_src" "0,g>")))]
+  "TARGET_H8300H || TARGET_H8300S"
+  "@
+  extu.w       %T0
+  mov.b        %R1,%s0\;extu.w %T0"
+  [(set_attr "length" "2,10")
+   (set_attr "cc" "set_znv,set_znv")])
+
 ;; The compiler can synthesize a 300H variant of this which is
 ;; just as efficient as one that we'd create
 (define_insn "zero_extendqisi2"