diff options
author | Kazu Hirata <kazu@cs.umass.edu> | 2004-02-01 17:01:34 +0000 |
---|---|---|
committer | Kazu Hirata <kazu@gcc.gnu.org> | 2004-02-01 17:01:34 +0000 |
commit | e0a24727f28754045955bb801d664ef123c0568a (patch) | |
tree | 2d56cdee303713f4fdbccfc9f2e737e30f59d1c2 /gcc | |
parent | 5202c5fea43373ecc71110db9b660358168a6ae4 (diff) | |
download | gcc-e0a24727f28754045955bb801d664ef123c0568a.zip gcc-e0a24727f28754045955bb801d664ef123c0568a.tar.gz gcc-e0a24727f28754045955bb801d664ef123c0568a.tar.bz2 |
* config/h8300/h8300.md (two peephole2's): New.
From-SVN: r77076
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/config/h8300/h8300.md | 35 |
2 files changed, 39 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 63063ce..6c57962 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2004-02-01 Kazu Hirata <kazu@cs.umass.edu> + + * config/h8300/h8300.md (two peephole2's): New. + 2004-02-01 Eric Botcazou <ebotcazou@libertysurf.fr> * config/sparc/sol2-bi.h: Handle TARGET_CPU_ultrasparc3. diff --git a/gcc/config/h8300/h8300.md b/gcc/config/h8300/h8300.md index b8c0c92..c0a9575 100644 --- a/gcc/config/h8300/h8300.md +++ b/gcc/config/h8300/h8300.md @@ -4969,3 +4969,38 @@ "operands[5] = gen_rtx_REG (QImode, REGNO (operands[0])); operands[6] = gen_int_mode (INTVAL (operands[1]), QImode); operands[7] = gen_int_mode (INTVAL (operands[2]), QImode);") + +;; These triggers right at the end of allocation of locals in the +;; prologue. The only profitable cases are when we have stack +;; adjustment of -4 or -12. That of -8 won't happen because it is +;; always split into two consecutive subtractions of -4. + +(define_peephole2 + [(set (reg:SI SP_REG) + (plus:SI (reg:SI SP_REG) + (const_int -4))) + (set (mem:SI (reg:SI SP_REG)) + (match_operand:SI 0 "register_operand" ""))] + "(TARGET_H8300H || TARGET_H8300S) && !TARGET_NORMAL_MODE + && REGNO (operands[0]) != SP_REG" + [(set (mem:SI (pre_dec:SI (reg:SI SP_REG))) + (match_dup 0))] + "") + +(define_peephole2 + [(set (reg:SI SP_REG) + (plus:SI (reg:SI SP_REG) + (const_int -12))) + (set (mem:SI (reg:SI SP_REG)) + (match_operand:SI 0 "register_operand" ""))] + "(TARGET_H8300H || TARGET_H8300S) && !TARGET_NORMAL_MODE + && REGNO (operands[0]) != SP_REG" + [(set (reg:SI SP_REG) + (plus:SI (reg:SI SP_REG) + (const_int -4))) + (set (reg:SI SP_REG) + (plus:SI (reg:SI SP_REG) + (const_int -4))) + (set (mem:SI (pre_dec:SI (reg:SI SP_REG))) + (match_dup 0))] + "") |