mips16 reg_or_0_operand doesn't allow zero

Jeffrey A Law law@hurl.cygnus.com
Tue Feb 2 21:50:00 GMT 1999


  In message <m103QHf-000sBeC@cetus.cygnus.com>you write:
  > 
  > 
  > The existing reg_or_0_operand predicate does not accept 0 for mips16,
  > which in general is the correct thing to do.  But, for mips16 div
  > traps, zero's are ok, and we can get better code for mips16 div_trap
  > tests if we allow them.
  > 
  > 
  > 	* config/mips/mips.c (true_reg_or_0_operand) : New function.
  > 	* config/mips/mips.h (PREDICATE_CODES): Add true_reg_or_0_operand.
  > 	* config/mips/mips.md (div_trap,div_trap_normal,div_trap_mips16): 
  > 	Use true_reg_or_0_operand for div_trap.
true_reg_or_0_operand allows:

  CONST_INT,
  CONST_DOUBLE,
  REG,
  SUBREG

  > +   {"true_reg_or_0_operand",	{ REG, CONST_INT, SUBREG }},	
Seems like you're missing CONST_DOUBLE here.

Fix that and the patch is OK.

Thanks!

jeff


More information about the Gcc-patches mailing list