This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
preprocess_constraints, reg-stack.c and register classes
- From: "Christian Ehrhardt" <ehrhardt at mathematik dot uni-ulm dot de>
- To: gcc at gcc dot gnu dot org
- Date: Mon, 10 Mar 2003 20:57:33 +0100
- Subject: preprocess_constraints, reg-stack.c and register classes
Hi,
preprocess_constraints calculates (among other things) the
register class of each operand in each alternative. However,
if an operand's constraint is just a number (i.e. it must match
another operand) the register class is uninitialized (NO_REGS).
The correct value would be the register class of the matched operand.
There are currently two users of this field:
* reg-stack.c just uses the class field without ever considering
if it was initialized. I don't know if i387 instructions just don't
use matched operands or if reg-stack.c is buggy.
* regrename.c calculates the proper register class before looking at
the class field.
My question is: Wouldn't it be a good idea if preprocess_constraints
would calculate the proper regclass?
Also could someone that understands regstack.c have a look at the uses
of recog_op_alt[][].class in regstack.c and tell me if the class should
indeed by NO_REGS if the operand contraint is a digit?
regards Christian
--
THAT'S ALL FOLKS!