diff options
author | Richard Henderson <rth@redhat.com> | 2003-02-04 16:43:22 -0800 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2003-02-04 16:43:22 -0800 |
commit | 0c9ed8564d0214c1f1ac18a165e9d2869a25f8d5 (patch) | |
tree | d1231e617a60d648c24d7aa85f9cab0e22d2276d /gcc/libgcc2.c | |
parent | 00d3c376535e66bf709ea5c0145d280857366742 (diff) | |
download | gcc-0c9ed8564d0214c1f1ac18a165e9d2869a25f8d5.zip gcc-0c9ed8564d0214c1f1ac18a165e9d2869a25f8d5.tar.gz gcc-0c9ed8564d0214c1f1ac18a165e9d2869a25f8d5.tar.bz2 |
libgcc2.c (__paritysi2, [...]): Replace last two reduction rounds with a "bit table" lookup.
* libgcc2.c (__paritysi2, __paritydi2): Replace last two reduction
rounds with a "bit table" lookup.
From-SVN: r62421
Diffstat (limited to 'gcc/libgcc2.c')
-rw-r--r-- | gcc/libgcc2.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/gcc/libgcc2.c b/gcc/libgcc2.c index a6eb1f0..2801681 100644 --- a/gcc/libgcc2.c +++ b/gcc/libgcc2.c @@ -664,9 +664,8 @@ __paritysi2 (USItype x) nx ^= nx >> 16; nx ^= nx >> 8; nx ^= nx >> 4; - nx ^= nx >> 2; - nx ^= nx >> 1; - return nx & 1; + nx &= 0xf; + return (0x6996 >> nx) & 1; } #endif @@ -680,9 +679,8 @@ __paritydi2 (UDItype x) nx ^= nx >> 16; nx ^= nx >> 8; nx ^= nx >> 4; - nx ^= nx >> 2; - nx ^= nx >> 1; - return nx & 1; + nx &= 0xf; + return (0x6996 >> nx) & 1; } #endif |