This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [mips patch RFA] handle trap_if with DI-mode arguments.
At Thu, 14 Aug 2003 17:03:03 +0000 (UTC), "Richard Sandiford" wrote:
> Anyway, to add another thing to your list: the conditional_trap expander
> should probably check that operand 1 really is zero and FAIL if not.
> With the way the current patterns are set up, it shouldn't make any
> difference, but it seems more robust.
I guess if there's nothing that'll generate them, why waste
space/time... 8-)
The other alternative is to:
(define_insn ""
[(trap_if (match_operator 0 "trap_cmp_op"
[(match_operand:SI 1 "reg_or_0_operand" "dJ")
(match_operand:SI 2 "reg_or_0_operand" "dJ")])
(match_operand:SI 3 "const_int_operand" "I"))]
"ISA_HAS_COND_TRAP"
"t%C0\\t%z1,%z2,%3")
and likewise for DI mode? (and, is that the right way to express what
i'm thinking? I'm trying to learn, here... 8-)
Actually, I know it's not, since the trap code is 10 bits, so that
constraint isn't strict enough. I bet one could fix that by making
the generator check for the right range. (Then one wouldn't need to
use a constraint letter at all, right, since no one can *generate* the
codes...)
chris