h8300.md (*zero_extendqihi2_h8300): Make the second alternative "#".
* config/h8300/h8300.md (*zero_extendqihi2_h8300): Make the second alternative "#". (*zero_extendqihi2_h8300hs): Likewise. (a define_split): New. From-SVN: r60388
This commit is contained in:
parent
3cee1a78e2
commit
f7e42925f6
2 changed files with 26 additions and 4 deletions
|
@ -1,3 +1,10 @@
|
|||
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
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Add table
Reference in a new issue