diff options
author | Richard Stallman <rms@gnu.org> | 1993-01-24 23:44:50 +0000 |
---|---|---|
committer | Richard Stallman <rms@gnu.org> | 1993-01-24 23:44:50 +0000 |
commit | 6da0ede8b60b0357fffb968d77f31f8430f9994c (patch) | |
tree | 3e08f26aba914689574954a1f97c0f5fbbb66fa0 /gcc | |
parent | cde62d1aeca917245b36169fdc918ecbad246494 (diff) | |
download | gcc-6da0ede8b60b0357fffb968d77f31f8430f9994c.zip gcc-6da0ede8b60b0357fffb968d77f31f8430f9994c.tar.gz gcc-6da0ede8b60b0357fffb968d77f31f8430f9994c.tar.bz2 |
(move/push address patterns):
Don't use alternative number to distinguish pushes from moves.
Use just one alternative `g' in output constraint.
From-SVN: r3320
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/config/vax/vax.md | 87 |
1 files changed, 57 insertions, 30 deletions
diff --git a/gcc/config/vax/vax.md b/gcc/config/vax/vax.md index c0bf70b..885ace7 100644 --- a/gcc/config/vax/vax.md +++ b/gcc/config/vax/vax.md @@ -1926,53 +1926,80 @@ ;; because we don't want pushl $1 turned into pushad 1. ;; or addl3 r1,r2,r3 turned into movab 0(r1)[r2],r3. +;; It does not work to use constraints to distinguish pushes from moves, +;; because < matches any autodecrement, not just a push. + (define_insn "" - [(set (match_operand:SI 0 "general_operand" "=<,g") - (match_operand:QI 1 "address_operand" "p,p"))] + [(set (match_operand:SI 0 "general_operand" "=g") + (match_operand:QI 1 "address_operand" "p"))] "" - "@ - pushab %a1 - movab %a1,%0") + "* +{ + if (push_operand (operands[0], SImode)) + return \"pushab %a1\"; + else + return \"movab %a1,%0\"; +}") (define_insn "" - [(set (match_operand:SI 0 "general_operand" "=<,g") - (match_operand:HI 1 "address_operand" "p,p"))] + [(set (match_operand:SI 0 "general_operand" "=g") + (match_operand:HI 1 "address_operand" "p"))] "" - "@ - pushaw %a1 - movaw %a1,%0") + "* +{ + if (push_operand (operands[0], SImode)) + return \"pushaw %a1\"; + else + return \"movaw %a1,%0\"; +}") (define_insn "" - [(set (match_operand:SI 0 "general_operand" "=<,g") - (match_operand:SI 1 "address_operand" "p,p"))] + [(set (match_operand:SI 0 "general_operand" "=g") + (match_operand:SI 1 "address_operand" "p"))] "" - "@ - pushal %a1 - moval %a1,%0") + "* +{ + if (push_operand (operands[0], SImode)) + return \"pushal %a1\"; + else + return \"movabl %a1,%0\"; +}") (define_insn "" - [(set (match_operand:SI 0 "general_operand" "=<,g") - (match_operand:DI 1 "address_operand" "p,p"))] + [(set (match_operand:SI 0 "general_operand" "=g") + (match_operand:DI 1 "address_operand" "p"))] "" - "@ - pushaq %a1 - movaq %a1,%0") + "* +{ + if (push_operand (operands[0], SImode)) + return \"pushaq %a1\"; + else + return \"movaq %a1,%0\"; +}") (define_insn "" - [(set (match_operand:SI 0 "general_operand" "=<,g") - (match_operand:SF 1 "address_operand" "p,p"))] + [(set (match_operand:SI 0 "general_operand" "=g") + (match_operand:SF 1 "address_operand" "p"))] "" - "@ - pushaf %a1 - movaf %a1,%0") + "* +{ + if (push_operand (operands[0], SImode)) + return \"pushaf %a1\"; + else + return \"movaf %a1,%0\"; +}") (define_insn "" - [(set (match_operand:SI 0 "general_operand" "=<,g") - (match_operand:DF 1 "address_operand" "p,p"))] + [(set (match_operand:SI 0 "general_operand" "=g") + (match_operand:DF 1 "address_operand" "p"))] "" - "@ - pushad %a1 - movad %a1,%0") + "* +{ + if (push_operand (operands[0], SImode)) + return \"pushad %a1\"; + else + return \"movad %a1,%0\"; +}") ;; These used to be peepholes, but it is more straightforward to do them ;; as single insns. However, we must force the output to be a register |