This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Make a register pair for use in divmodm4
- From: Anders Ådland <adland at stud dot ntnu dot no>
- To: gcc at gcc dot gnu dot org
- Date: 04 Apr 2003 15:31:24 +0200
- Subject: Make a register pair for use in divmodm4
Hi. I'm writing a pattern for "udivmodsi4" using the RTL template like
this:
[(set (match_operand:SI 0 "register_operand" "=r")
(udiv:SI (match_operand:SI 1 "register_operand" "r")
(match_operand:SI 2 "register_operand" "r")))
(set (match_operand:SI 3 "register_operand" "=r")
(umod:SI (match_dup 1)
(match_dup 2)))]
The architecture has an instruction for doing this with three operands
that can be specified, op0-op2 in the template, and one implisit, op3 in
the template.
The instruction is doing:
rd <-- rx / ry;
rd+1 <-- rx % ry;
All operands have to be a register.
How can I tell the compiler that op3 has to be the next register after
op0. (REGNO(op3) == (REGNO(op0)+1)
Anders