From 0c9ed8564d0214c1f1ac18a165e9d2869a25f8d5 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Tue, 4 Feb 2003 16:43:22 -0800 Subject: [PATCH] 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 --- gcc/ChangeLog | 5 +++++ gcc/libgcc2.c | 10 ++++------ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index dfafdec874a..17553a395b2 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2003-02-04 Richard Henderson + + * libgcc2.c (__paritysi2, __paritydi2): Replace last two reduction + rounds with a "bit table" lookup. + 2003-02-04 Ulrich Weigand * reload.c (find_reloads): Do not use the mode specified in the insn 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 -- 2.30.2