[prev in list] [next in list] [prev in thread] [next in thread]
List: pcc-list
Subject: Re: powerpc: simmod() can produce incorrect code
From: Stefan Kempf <stefan () nefkom ! net>
Date: 2008-06-07 8:41:24
Message-ID: 20080607084124.GA19357 () murdock ! my-fqdn ! de
[Download RAW message or body]
Gregory McGarry wrote:
> Would this be okay?
>
> Index: local.c
> ===================================================================
> RCS file: /cvsroot/pcc/arch/powerpc/local.c,v
> retrieving revision 1.11
> diff -u -r1.11 local.c
> --- local.c 11 May 2008 16:55:03 -0000 1.11
> +++ local.c 7 Jun 2008 00:48:52 -0000
> @@ -1267,6 +1267,9 @@
>
> assert(p->n_op == MOD);
>
> + if (!ISUNSIGNED(p->n_type))
> + return;
> +
> #define ISPOW2(n) ((n) && (((n)&((n)-1)) == 0))
>
> // if the right is a constant power of two, then replace with AND
Looks right.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic