aboutsummaryrefslogtreecommitdiff
path: root/gcc/libgcc2.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2003-02-04 16:43:22 -0800
committerRichard Henderson <rth@gcc.gnu.org>2003-02-04 16:43:22 -0800
commit0c9ed8564d0214c1f1ac18a165e9d2869a25f8d5 (patch)
treed1231e617a60d648c24d7aa85f9cab0e22d2276d /gcc/libgcc2.c
parent00d3c376535e66bf709ea5c0145d280857366742 (diff)
downloadgcc-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.c10
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