mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-11 09:06:56 +08:00
h8300.md: Move push patterns into one section of the file.
* config/h8300/h8300.md: Move push patterns into one section of the file. From-SVN: r78030
This commit is contained in:
parent
8d04e6db1f
commit
5a64541a22
@ -1,3 +1,8 @@
|
||||
2004-02-18 Kazu Hirata <kazu@cs.umass.edu>
|
||||
|
||||
* config/h8300/h8300.md: Move push patterns into one
|
||||
section of the file.
|
||||
|
||||
2004-02-18 Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
PR c++/11326
|
||||
|
@ -120,50 +120,6 @@
|
||||
|
||||
;; movqi
|
||||
|
||||
(define_insn "pushqi1_h8300"
|
||||
[(set (reg:HI SP_REG)
|
||||
(plus:HI (reg:HI SP_REG) (const_int -2)))
|
||||
(set (mem:QI (plus:HI (reg:HI SP_REG) (const_int -1)))
|
||||
(match_operand:QI 0 "register_operand" "r"))]
|
||||
"TARGET_H8300
|
||||
&& operands[0] != stack_pointer_rtx"
|
||||
"mov.w\\t%T0,@-r7"
|
||||
[(set_attr "length" "2")])
|
||||
|
||||
(define_insn "pushqi1_h8300hs"
|
||||
[(set (reg:SI SP_REG)
|
||||
(plus:SI (reg:SI SP_REG) (const_int -4)))
|
||||
(set (mem:QI (plus:SI (reg:SI SP_REG) (const_int -3)))
|
||||
(match_operand:QI 0 "register_operand" "r"))]
|
||||
"(TARGET_H8300H || TARGET_H8300S)
|
||||
&& operands[0] != stack_pointer_rtx"
|
||||
"mov.l\\t%S0,@-er7"
|
||||
[(set_attr "length" "4")])
|
||||
|
||||
(define_insn "pushqi1_h8300hs_normal"
|
||||
[(set (reg:HI SP_REG)
|
||||
(plus:HI (reg:HI SP_REG) (const_int -4)))
|
||||
(set (mem:QI (plus:HI (reg:HI SP_REG) (const_int -3)))
|
||||
(match_operand:QI 0 "register_operand" "r"))]
|
||||
"(TARGET_H8300H || TARGET_H8300S)
|
||||
&& operands[0] != stack_pointer_rtx"
|
||||
"mov.l\\t%S0,@-er7"
|
||||
[(set_attr "length" "4")])
|
||||
|
||||
(define_expand "pushqi1"
|
||||
[(match_operand:QI 0 "register_operand" "")]
|
||||
""
|
||||
"
|
||||
{
|
||||
if (TARGET_H8300)
|
||||
emit_insn (gen_pushqi1_h8300 (operands[0]));
|
||||
else if (!TARGET_NORMAL_MODE)
|
||||
emit_insn (gen_pushqi1_h8300hs (operands[0]));
|
||||
else
|
||||
emit_insn (gen_pushqi1_h8300hs_normal (operands[0]));
|
||||
DONE;
|
||||
}")
|
||||
|
||||
(define_insn "*movqi_h8300"
|
||||
[(set (match_operand:QI 0 "general_operand_dst" "=r,r ,<,r,r,m")
|
||||
(match_operand:QI 1 "general_operand_src" " I,r>,r,n,m,r"))]
|
||||
@ -228,47 +184,6 @@
|
||||
|
||||
;; movhi
|
||||
|
||||
(define_expand "pushhi1_h8300"
|
||||
[(set (mem:HI (pre_dec:HI (reg:HI SP_REG)))
|
||||
(match_operand:HI 0 "register_operand" ""))]
|
||||
"TARGET_H8300
|
||||
&& operands[0] != stack_pointer_rtx"
|
||||
"")
|
||||
|
||||
(define_insn "pushhi1_h8300hs"
|
||||
[(set (reg:SI SP_REG)
|
||||
(plus:SI (reg:SI SP_REG) (const_int -4)))
|
||||
(set (mem:HI (plus:SI (reg:SI SP_REG) (const_int -2)))
|
||||
(match_operand:HI 0 "register_operand" "r"))]
|
||||
"(TARGET_H8300H || TARGET_H8300S)
|
||||
&& operands[0] != stack_pointer_rtx"
|
||||
"mov.l\\t%S0,@-er7"
|
||||
[(set_attr "length" "4")])
|
||||
|
||||
(define_insn "pushhi1_h8300hs_normal"
|
||||
[(set (reg:HI SP_REG)
|
||||
(plus:HI (reg:HI SP_REG) (const_int -4)))
|
||||
(set (mem:HI (plus:HI (reg:HI SP_REG) (const_int -2)))
|
||||
(match_operand:HI 0 "register_operand" "r"))]
|
||||
"(TARGET_H8300H || TARGET_H8300S)
|
||||
&& operands[0] != stack_pointer_rtx"
|
||||
"mov.l\\t%S0,@-er7"
|
||||
[(set_attr "length" "4")])
|
||||
|
||||
(define_expand "pushhi1"
|
||||
[(match_operand:HI 0 "register_operand" "")]
|
||||
""
|
||||
"
|
||||
{
|
||||
if (TARGET_H8300)
|
||||
emit_insn (gen_pushhi1_h8300 (operands[0]));
|
||||
else if (!TARGET_NORMAL_MODE)
|
||||
emit_insn (gen_pushhi1_h8300hs (operands[0]));
|
||||
else
|
||||
emit_insn (gen_pushhi1_h8300hs_normal (operands[0]));
|
||||
DONE;
|
||||
}")
|
||||
|
||||
(define_insn "*movhi_h8300"
|
||||
[(set (match_operand:HI 0 "general_operand_dst" "=r,r,<,r,r,m")
|
||||
(match_operand:HI 1 "general_operand_src" "I,r>,r,i,m,r"))]
|
||||
@ -604,6 +519,95 @@
|
||||
(set_attr "cc" "set_zn,set_znv,set_znv,set_znv,set_znv,set_znv")])
|
||||
|
||||
;; ----------------------------------------------------------------------
|
||||
;; PUSH INSTRUCTIONS
|
||||
;; ----------------------------------------------------------------------
|
||||
|
||||
(define_insn "pushqi1_h8300"
|
||||
[(set (reg:HI SP_REG)
|
||||
(plus:HI (reg:HI SP_REG) (const_int -2)))
|
||||
(set (mem:QI (plus:HI (reg:HI SP_REG) (const_int -1)))
|
||||
(match_operand:QI 0 "register_operand" "r"))]
|
||||
"TARGET_H8300
|
||||
&& operands[0] != stack_pointer_rtx"
|
||||
"mov.w\\t%T0,@-r7"
|
||||
[(set_attr "length" "2")])
|
||||
|
||||
(define_insn "pushqi1_h8300hs"
|
||||
[(set (reg:SI SP_REG)
|
||||
(plus:SI (reg:SI SP_REG) (const_int -4)))
|
||||
(set (mem:QI (plus:SI (reg:SI SP_REG) (const_int -3)))
|
||||
(match_operand:QI 0 "register_operand" "r"))]
|
||||
"(TARGET_H8300H || TARGET_H8300S)
|
||||
&& operands[0] != stack_pointer_rtx"
|
||||
"mov.l\\t%S0,@-er7"
|
||||
[(set_attr "length" "4")])
|
||||
|
||||
(define_insn "pushqi1_h8300hs_normal"
|
||||
[(set (reg:HI SP_REG)
|
||||
(plus:HI (reg:HI SP_REG) (const_int -4)))
|
||||
(set (mem:QI (plus:HI (reg:HI SP_REG) (const_int -3)))
|
||||
(match_operand:QI 0 "register_operand" "r"))]
|
||||
"(TARGET_H8300H || TARGET_H8300S)
|
||||
&& operands[0] != stack_pointer_rtx"
|
||||
"mov.l\\t%S0,@-er7"
|
||||
[(set_attr "length" "4")])
|
||||
|
||||
(define_expand "pushqi1"
|
||||
[(match_operand:QI 0 "register_operand" "")]
|
||||
""
|
||||
"
|
||||
{
|
||||
if (TARGET_H8300)
|
||||
emit_insn (gen_pushqi1_h8300 (operands[0]));
|
||||
else if (!TARGET_NORMAL_MODE)
|
||||
emit_insn (gen_pushqi1_h8300hs (operands[0]));
|
||||
else
|
||||
emit_insn (gen_pushqi1_h8300hs_normal (operands[0]));
|
||||
DONE;
|
||||
}")
|
||||
|
||||
(define_expand "pushhi1_h8300"
|
||||
[(set (mem:HI (pre_dec:HI (reg:HI SP_REG)))
|
||||
(match_operand:HI 0 "register_operand" ""))]
|
||||
"TARGET_H8300
|
||||
&& operands[0] != stack_pointer_rtx"
|
||||
"")
|
||||
|
||||
(define_insn "pushhi1_h8300hs"
|
||||
[(set (reg:SI SP_REG)
|
||||
(plus:SI (reg:SI SP_REG) (const_int -4)))
|
||||
(set (mem:HI (plus:SI (reg:SI SP_REG) (const_int -2)))
|
||||
(match_operand:HI 0 "register_operand" "r"))]
|
||||
"(TARGET_H8300H || TARGET_H8300S)
|
||||
&& operands[0] != stack_pointer_rtx"
|
||||
"mov.l\\t%S0,@-er7"
|
||||
[(set_attr "length" "4")])
|
||||
|
||||
(define_insn "pushhi1_h8300hs_normal"
|
||||
[(set (reg:HI SP_REG)
|
||||
(plus:HI (reg:HI SP_REG) (const_int -4)))
|
||||
(set (mem:HI (plus:HI (reg:HI SP_REG) (const_int -2)))
|
||||
(match_operand:HI 0 "register_operand" "r"))]
|
||||
"(TARGET_H8300H || TARGET_H8300S)
|
||||
&& operands[0] != stack_pointer_rtx"
|
||||
"mov.l\\t%S0,@-er7"
|
||||
[(set_attr "length" "4")])
|
||||
|
||||
(define_expand "pushhi1"
|
||||
[(match_operand:HI 0 "register_operand" "")]
|
||||
""
|
||||
"
|
||||
{
|
||||
if (TARGET_H8300)
|
||||
emit_insn (gen_pushhi1_h8300 (operands[0]));
|
||||
else if (!TARGET_NORMAL_MODE)
|
||||
emit_insn (gen_pushhi1_h8300hs (operands[0]));
|
||||
else
|
||||
emit_insn (gen_pushhi1_h8300hs_normal (operands[0]));
|
||||
DONE;
|
||||
}")
|
||||
|
||||
;; ----------------------------------------------------------------------
|
||||
;; TEST INSTRUCTIONS
|
||||
;; ----------------------------------------------------------------------
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user