aboutsummaryrefslogtreecommitdiff
path: root/sys/libkern/scanc.c
diff options
context:
space:
mode:
authorBruce Evans <bde@FreeBSD.org>2003-07-25 15:54:23 +0000
committerBruce Evans <bde@FreeBSD.org>2003-07-25 15:54:23 +0000
commit4066649d5aaa66cd2834d86beb8aeb0720304995 (patch)
treed71a5b66afd569df931875a573c3fe386e8bdaa4 /sys/libkern/scanc.c
parent42203b623d6e197c6529663d735d82c76f42b84b (diff)
downloadsrc-4066649d5aaa66cd2834d86beb8aeb0720304995.tar.gz
src-4066649d5aaa66cd2834d86beb8aeb0720304995.zip
Backed out the micro-optimization in 1.4. It was to help gcc-2.6.3
on i486's (and probably i386's), but it has had very little effect since gcc-2.7 or gcc-2.95. With gcc-3.3, it gave a small pessimization for at least i386's, athlon-xp's and pentium4's, a small optimization (I think) for pentium1's, and made no difference for i386's. (movzbl is best for all the later processors, and the micro-optimization was to stop it being used on i486's.)
Notes
Notes: svn path=/head/; revision=118017
Diffstat (limited to 'sys/libkern/scanc.c')
-rw-r--r--sys/libkern/scanc.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/sys/libkern/scanc.c b/sys/libkern/scanc.c
index 0abc2229665a..6f637ddf0a5d 100644
--- a/sys/libkern/scanc.c
+++ b/sys/libkern/scanc.c
@@ -49,12 +49,7 @@ scanc(size, cp, table, mask0)
mask = mask0;
for (end = &cp[size]; cp < end; ++cp) {
- /*
- * gcc-2.6.3 generates poor (un)sign extension code on i386's.
- * The cast to volatile should have no effect, but in fact it
- * improves the code on i386's.
- */
- if (table[*(volatile const u_char *)cp] & mask)
+ if (table[*cp] & mask)
break;
}
return (end - cp);