This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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!


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]