aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/h8300
diff options
context:
space:
mode:
authorKazu Hirata <kazu@hxi.com>2001-08-30 17:17:17 +0000
committerKazu Hirata <kazu@gcc.gnu.org>2001-08-30 17:17:17 +0000
commit6f41623f030d340b9f852937e9b445feec5d40e6 (patch)
tree258cf52cb3f1e5fa93137db1669ee27ec99d9707 /gcc/config/h8300
parentee437932688dda18e9505d1024206ba6c2f4ad22 (diff)
downloadgcc-6f41623f030d340b9f852937e9b445feec5d40e6.zip
gcc-6f41623f030d340b9f852937e9b445feec5d40e6.tar.gz
gcc-6f41623f030d340b9f852937e9b445feec5d40e6.tar.bz2
h8300.md (zero_extendqihi2): Changes to define_expand to accomodate target-specific attributes.
* config/h8300/h8300.md (zero_extendqihi2): Changes to define_expand to accomodate target-specific attributes. (anonymous zero_extendqihi2 patterns): New. From-SVN: r45290
Diffstat (limited to 'gcc/config/h8300')
-rw-r--r--gcc/config/h8300/h8300.md20
1 files changed, 18 insertions, 2 deletions
diff --git a/gcc/config/h8300/h8300.md b/gcc/config/h8300/h8300.md
index 8fb3271..eb7dc77 100644
--- a/gcc/config/h8300/h8300.md
+++ b/gcc/config/h8300/h8300.md
@@ -1604,16 +1604,32 @@
;; 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"