This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH/RFA] genattrtab: Put a unsigned cast for unsignedcomparisons
Roger Sayle <roger@eyesopen.com> wrote:
> You can simplify this patch a bit by moving the existing GEU, GTU, LEU
> and LTU cases to the top of the switch statement, calling printf there
> and then falling through.
Sure. The below is a revised patch that you've suggested.
I'm trying bootstrap and regtest it on i686-pc-linux-gnu,
though it's unlikely to change.
Thanks for your suggestion.
Regards,
kaz
--
2004-06-25 Kaz Kojima <kkojima@gcc.gnu.org>
* genattrtab.c (write_test_expr): Put a unsigned cast before
the first operand for GEU, GTU, LEU and LTU.
diff -upr ORIG/gcc/gcc/genattrtab.c LOCAL/gcc/gcc/genattrtab.c
--- ORIG/gcc/gcc/genattrtab.c 2004-05-14 10:06:21.000000000 +0900
+++ LOCAL/gcc/gcc/genattrtab.c 2004-06-26 11:01:30.000000000 +0900
@@ -4571,9 +4571,14 @@ write_test_expr (rtx exp, int flags)
switch (code)
{
/* Binary operators. */
+ case GEU: case GTU:
+ case LEU: case LTU:
+ printf ("(unsigned) ");
+ /* Fall through. */
+
case EQ: case NE:
- case GE: case GT: case GEU: case GTU:
- case LE: case LT: case LEU: case LTU:
+ case GE: case GT:
+ case LE: case LT:
comparison_operator = 1;
case PLUS: case MINUS: case MULT: case DIV: case MOD: