aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/config/moxie/moxie.md
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/config/moxie/moxie.md')
-rw-r--r--gcc-4.9/gcc/config/moxie/moxie.md50
1 files changed, 50 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/config/moxie/moxie.md b/gcc-4.9/gcc/config/moxie/moxie.md
index 713f9b65d..793cac3f8 100644
--- a/gcc-4.9/gcc/config/moxie/moxie.md
+++ b/gcc-4.9/gcc/config/moxie/moxie.md
@@ -239,6 +239,56 @@
ldo.l %0, %1"
[(set_attr "length" "2,2,6,2,6,2,6,6,6")])
+(define_insn_and_split "zero_extendqisi2"
+ [(set (match_operand:SI 0 "register_operand" "=r,r,r,r")
+ (zero_extend:SI (match_operand:QI 1 "nonimmediate_operand" "0,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" "0,2,6,6")])
+
+(define_insn_and_split "zero_extendhisi2"
+ [(set (match_operand:SI 0 "register_operand" "=r,r,r,r")
+ (zero_extend:SI (match_operand:HI 1 "nonimmediate_operand" "0,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" "0,2,6,6")])
+
+(define_insn "extendqisi2"
+ [(set (match_operand:SI 0 "register_operand" "=r")
+ (sign_extend:SI (match_operand:QI 1 "nonimmediate_operand" "r")))]
+ ""
+ "@
+ sex.b %0, %1"
+ [(set_attr "length" "2")])
+
+(define_insn "extendhisi2"
+ [(set (match_operand:SI 0 "register_operand" "=r")
+ (sign_extend:SI (match_operand:HI 1 "nonimmediate_operand" "r")))]
+ ""
+ "@
+ sex.s %0, %1"
+ [(set_attr "length" "2")])
+
(define_expand "movqi"
[(set (match_operand:QI 0 "general_operand" "")
(match_operand:QI 1 "general_operand" ""))]