diff options
author | kazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-12-21 17:47:32 +0000 |
---|---|---|
committer | kazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-12-21 17:47:32 +0000 |
commit | bb38add7ab14a2f666f845fb7cd66a99e09831c4 (patch) | |
tree | bcb437286edf9cc5b84507d3fef8a0bca95a9b4f | |
parent | c5673261781c160c3dbcecab347342382ff0ed31 (diff) | |
download | gcc-bb38add7ab14a2f666f845fb7cd66a99e09831c4.tar.gz |
* config/h8300/h8300.md (*zero_extendqihi2_h8300): Make the
second alternative "#".
(*zero_extendqihi2_h8300hs): Likewise.
(a define_split): New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@60388 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/config/h8300/h8300.md | 23 |
2 files changed, 26 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5896006ece7..c5170cd9f96 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,12 @@ 2002-12-21 Kazu Hirata <kazu@cs.umass.edu> + * config/h8300/h8300.md (*zero_extendqihi2_h8300): Make the + second alternative "#". + (*zero_extendqihi2_h8300hs): Likewise. + (a define_split): New. + +2002-12-21 Kazu Hirata <kazu@cs.umass.edu> + * config/h8300/h8300-protos.h: Update the prototype for split_adds_subs. Add prototypes for const_le_2_operand and const_le_6_operand. diff --git a/gcc/config/h8300/h8300.md b/gcc/config/h8300/h8300.md index 5eb0c74ee9c..b3b50febfd8 100644 --- a/gcc/config/h8300/h8300.md +++ b/gcc/config/h8300/h8300.md @@ -1802,26 +1802,41 @@ "" "") -(define_insn "" +(define_insn "*zero_extendqihi2_h8300" [(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 "" +(define_insn "*zero_extendqihi2_h8300hs" [(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")]) +;; Split the zero extension of a general operand (actually a memory +;; operand) into a load of the operand and the actual zero extension +;; so that 1) the length will be accurate, and 2) the zero extensions +;; appearing at the end of basic blocks may be merged. + +(define_split + [(set (match_operand:HI 0 "register_operand" "") + (zero_extend:HI (match_operand:QI 1 "general_operand_src" "")))] + "reload_completed" + [(set (match_dup 2) + (match_dup 1)) + (set (match_dup 0) + (zero_extend:HI (match_dup 2)))] + "operands[2] = gen_rtx_REG (QImode, REGNO (operands[0]));") + ;; The compiler can synthesize a H8/300H variant of this which is ;; just as efficient as one that we'd create (define_insn "zero_extendqisi2" |