This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: mips16 reg_or_0_operand doesn't allow zero
- To: Gavin Romig-Koch <gavin at cygnus dot com>
- Subject: Re: mips16 reg_or_0_operand doesn't allow zero
- From: Jeffrey A Law <law at hurl dot cygnus dot com>
- Date: Tue, 02 Feb 1999 22:46:24 -0700
- cc: egcs-patches at cygnus dot com
- Reply-To: law at cygnus dot com
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