diff options
author | Kazu Hirata <kazu@gcc.gnu.org> | 2003-11-23 22:27:34 +0000 |
---|---|---|
committer | Kazu Hirata <kazu@gcc.gnu.org> | 2003-11-23 22:27:34 +0000 |
commit | f24f089748291299d1feb3e8b3f84ecf735956bf (patch) | |
tree | 8bff9a48bb798da5d39cb5846e97b49584c6a20c /gcc | |
parent | a5d8d874fa06f52faab6d1821cae180fc566d279 (diff) | |
download | gcc-f24f089748291299d1feb3e8b3f84ecf735956bf.zip gcc-f24f089748291299d1feb3e8b3f84ecf735956bf.tar.gz gcc-f24f089748291299d1feb3e8b3f84ecf735956bf.tar.bz2 |
h8300.c (push): Call push_h8300hs_normal in normal mode.
* config/h8300/h8300.c (push): Call push_h8300hs_normal in
normal mode.
(pop): Call pop_h8300hs_normal in normal mode.
* config/h8300/h8300.md: Likewise.
(pushqi1_h8300hs_normal): New.
(pushqi1): Call pushqi1_h8300hs_normal in normal mode.
(pushhi1_h8300hs_normal): New.
(pushhi1): Call pushhi1_h8300hs_normal in normal mode.
(push_h8300hs_normal): New.
(pop_h8300hs_normal): Likewise.
From-SVN: r73862
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 15 | ||||
-rw-r--r-- | gcc/config/h8300/h8300.c | 8 | ||||
-rw-r--r-- | gcc/config/h8300/h8300.md | 42 |
3 files changed, 60 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 0dccce8..177edd2 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,4 +1,17 @@ -2003-11-03 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz> +2003-11-23 Kazu Hirata <kazu@cs.umass.edu> + + * config/h8300/h8300.c (push): Call push_h8300hs_normal in + normal mode. + (pop): Call pop_h8300hs_normal in normal mode. + * config/h8300/h8300.md: Likewise. + (pushqi1_h8300hs_normal): New. + (pushqi1): Call pushqi1_h8300hs_normal in normal mode. + (pushhi1_h8300hs_normal): New. + (pushhi1): Call pushhi1_h8300hs_normal in normal mode. + (push_h8300hs_normal): New. + (pop_h8300hs_normal): Likewise. + +2003-11-23 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz> * genattrtab.c (count_sub_rtxs): Removed. diff --git a/gcc/config/h8300/h8300.c b/gcc/config/h8300/h8300.c index dc818db..41c7f84 100644 --- a/gcc/config/h8300/h8300.c +++ b/gcc/config/h8300/h8300.c @@ -434,8 +434,10 @@ push (int rn) if (TARGET_H8300) x = gen_push_h8300 (reg); - else + else if (!TARGET_NORMAL_MODE) x = gen_push_h8300hs (reg); + else + x = gen_push_h8300hs_normal (reg); x = emit_insn (x); REG_NOTES (x) = gen_rtx_EXPR_LIST (REG_INC, stack_pointer_rtx, 0); } @@ -450,8 +452,10 @@ pop (int rn) if (TARGET_H8300) x = gen_pop_h8300 (reg); - else + else if (!TARGET_NORMAL_MODE) x = gen_pop_h8300hs (reg); + else + x = gen_pop_h8300hs_normal (reg); x = emit_insn (x); REG_NOTES (x) = gen_rtx_EXPR_LIST (REG_INC, stack_pointer_rtx, 0); } diff --git a/gcc/config/h8300/h8300.md b/gcc/config/h8300/h8300.md index 8f6e78c..8a05803 100644 --- a/gcc/config/h8300/h8300.md +++ b/gcc/config/h8300/h8300.md @@ -140,6 +140,17 @@ [(set_attr "length" "4") (set_attr "cc" "clobber")]) +(define_insn "pushqi1_h8300hs_normal" + [(parallel [(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") + (set_attr "cc" "clobber")]) + (define_expand "pushqi1" [(use (match_operand:QI 0 "register_operand" ""))] "" @@ -147,8 +158,10 @@ { if (TARGET_H8300) emit_insn (gen_pushqi1_h8300 (operands[0])); - else + else if (!TARGET_NORMAL_MODE) emit_insn (gen_pushqi1_h8300hs (operands[0])); + else + emit_insn (gen_pushqi1_h8300hs_normal (operands[0])); DONE; }") @@ -232,6 +245,17 @@ [(set_attr "length" "4") (set_attr "cc" "clobber")]) +(define_insn "pushhi1_h8300hs_normal" + [(parallel [(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") + (set_attr "cc" "clobber")]) + (define_expand "pushhi1" [(use (match_operand:HI 0 "register_operand" ""))] "" @@ -239,8 +263,10 @@ { if (TARGET_H8300) emit_insn (gen_pushhi1_h8300 (operands[0])); - else + else if (!TARGET_NORMAL_MODE) emit_insn (gen_pushhi1_h8300hs (operands[0])); + else + emit_insn (gen_pushhi1_h8300hs_normal (operands[0])); DONE; }") @@ -1847,6 +1873,12 @@ "TARGET_H8300H && TARGET_H8300S" "") +(define_expand "push_h8300hs_normal" + [(set (mem:SI (pre_dec:HI (reg:HI SP_REG))) + (match_operand:SI 0 "register_operand" "=r"))] + "TARGET_NORMAL_MODE" + "") + (define_expand "pop_h8300" [(set (match_operand:HI 0 "register_operand" "=r") (mem:HI (post_inc:HI (reg:HI SP_REG))))] @@ -1859,6 +1891,12 @@ "TARGET_H8300H && TARGET_H8300S" "") +(define_expand "pop_h8300hs_normal" + [(set (match_operand:SI 0 "register_operand" "=r") + (mem:SI (post_inc:HI (reg:HI SP_REG))))] + "TARGET_NORMAL_MODE" + "") + (define_insn "stm_h8300s_2" [(parallel [(set (reg:SI SP_REG) |