Fix zero extension for moxie
authorAnthony Green <green@moxielogic.com>
Tue, 30 Dec 2014 23:58:44 +0000 (23:58 +0000)
committerAnthony Green <green@gcc.gnu.org>
Tue, 30 Dec 2014 23:58:44 +0000 (23:58 +0000)
From-SVN: r219116

gcc/ChangeLog
gcc/config/moxie/moxie.md

index 2b89c49d2758e450e4d77040744c28b67c66d28e..60986f99a11b78aa903d32595cf8fd79868a95c8 100644 (file)
@@ -1,3 +1,9 @@
+2014-12-30  Anthony Green  <green@moxielogic.com>
+
+       * config/moxie/moxie.md (zero_extendqisi2, zero_extendhisi2):
+       Switch from define_insn_and_split to define_insn.  Fix instruction
+       length.
+
 2014-12-30  Uros Bizjak  <ubizjak@gmail.com>
 
        * config/i386/i386.c (ix86_legitimize_address): Declare
index 32108ff41c893e08a7929a5bb29e6b145790cfa2..fe98eaa34d7d78f0dbfbf94f5cb31ac2b00ad6e2 100644 (file)
    ldo.l  %0, %1"
   [(set_attr "length"  "2,2,6,2,6,2,6,4,4")])
 
-(define_insn_and_split "zero_extendqisi2"
+(define_insn "zero_extendqisi2"
   [(set (match_operand:SI 0 "register_operand" "=r,r,r,r")
        (zero_extend:SI (match_operand:QI 1 "nonimmediate_operand" "r,W,A,B")))]
   ""
    ld.b   %0, %1
    lda.b  %0, %1
    ldo.b  %0, %1"
-  "reload_completed"
-  [(set (match_dup 2) (match_dup 1))
-   (set (match_dup 0) (zero_extend:SI (match_dup 2)))]
-{
-  operands[2] = gen_lowpart (QImode, operands[0]);
-}
-  [(set_attr "length" "2,2,6,6")])
+  [(set_attr "length" "2,2,6,4")])
 
-(define_insn_and_split "zero_extendhisi2"
+(define_insn "zero_extendhisi2"
   [(set (match_operand:SI 0 "register_operand" "=r,r,r,r")
        (zero_extend:SI (match_operand:HI 1 "nonimmediate_operand" "r,W,A,B")))]
   ""
    ld.s   %0, %1
    lda.s  %0, %1
    ldo.s  %0, %1"
-  "reload_completed"
-  [(set (match_dup 2) (match_dup 1))
-   (set (match_dup 0) (zero_extend:SI (match_dup 2)))]
-{
-  operands[2] = gen_lowpart (HImode, operands[0]);
-}
-  [(set_attr "length" "2,2,6,6")])
+  [(set_attr "length" "2,2,6,4")])
 
 (define_insn "extendqisi2"
   [(set (match_operand:SI 0 "register_operand" "=r")