summaryrefslogtreecommitdiff
path: root/gcc/libgcc2.c
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2003-02-05 00:43:22 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2003-02-05 00:43:22 +0000
commit9acebba82637e1a8e9d0902443f0bf3bd6b70752 (patch)
treed1231e617a60d648c24d7aa85f9cab0e22d2276d /gcc/libgcc2.c
parentf9f21662bd312d87b9d96dcc3a83985ed1b00367 (diff)
downloadgcc-9acebba82637e1a8e9d0902443f0bf3bd6b70752.tar.gz
* libgcc2.c (__paritysi2, __paritydi2): Replace last two reduction
rounds with a "bit table" lookup. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@62421 138bc75d-0d04-0410-961f-82ee72b054a4
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 a6eb1f09f48..2801681e97f 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