diff options
author | Richard Stallman <rms@gnu.org> | 1993-10-06 22:09:26 +0000 |
---|---|---|
committer | Richard Stallman <rms@gnu.org> | 1993-10-06 22:09:26 +0000 |
commit | ce966a60618059edbe930eede5f1370cc95560a7 (patch) | |
tree | 25f5f16194b8486fcac623c0fe0a9d99152657db /gcc/config | |
parent | 33724a9fb2d8f62576e56d51b9182bf7a2a939f2 (diff) | |
download | gcc-ce966a60618059edbe930eede5f1370cc95560a7.zip gcc-ce966a60618059edbe930eede5f1370cc95560a7.tar.gz gcc-ce966a60618059edbe930eede5f1370cc95560a7.tar.bz2 |
Add peepholes for stack adjust plus pushes.
(recognizer for subtracting const from reg 17):
Add %$ in adjspb/adjspd insns.
From-SVN: r5648
Diffstat (limited to 'gcc/config')
-rw-r--r-- | gcc/config/ns32k/ns32k.md | 32 |
1 files changed, 30 insertions, 2 deletions
diff --git a/gcc/config/ns32k/ns32k.md b/gcc/config/ns32k/ns32k.md index 8a92a54..66f5655 100644 --- a/gcc/config/ns32k/ns32k.md +++ b/gcc/config/ns32k/ns32k.md @@ -945,8 +945,8 @@ { if (GET_CODE(operands[0]) == CONST_INT && INTVAL(operands[0]) < 64 && INTVAL(operands[0]) > -64 && ! TARGET_32532) - return \"adjspb %0\"; - return \"adjspd %0\"; + return \"adjspb %$%0\"; + return \"adjspd %$%0\"; }") (define_insn "subsi3" @@ -2583,3 +2583,31 @@ (leu:QI (cc0) (const_int 0)))] "" "slsb %0") + +;; Speed up stack adjust followed by a fullword fixedpoint push. + +(define_peephole + [(set (reg:SI 17) (plus:SI (reg:SI 17) (const_int 4))) + (set (match_operand:SI 0 "push_operand" "=m") + (match_operand:SI 1 "general_operand" "g"))] + "! reg_mentioned_p (stack_pointer_rtx, operands[1])" + "* +{ + return \"movd %1,0(sp)\"; +}") + +;; Speed up stack adjust followed by two fullword fixedpoint pushes. + +(define_peephole + [(set (reg:SI 17) (plus:SI (reg:SI 17) (const_int 8))) + (set (match_operand:SI 0 "push_operand" "=m") + (match_operand:SI 1 "general_operand" "g")) + (set (match_operand:SI 2 "push_operand" "=m") + (match_operand:SI 3 "general_operand" "g"))] + "! reg_mentioned_p (stack_pointer_rtx, operands[1]) + && ! reg_mentioned_p (stack_pointer_rtx, operands[3])" + "* +{ + return \"movd %1,4(sp); movd %3,0(sp)\"; +}") + |