This is the mail archive of the gcc-patches@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]

Re: mips16 reg_or_0_operand doesn't allow zero


  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


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