diff options
author | bde <bde@FreeBSD.org> | 2003-07-25 15:54:23 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 2003-07-25 15:54:23 +0000 |
commit | ea9b26bc94ee4b76cecbc4dd120898f7adeffb54 (patch) | |
tree | d71a5b66afd569df931875a573c3fe386e8bdaa4 | |
parent | 60f3be7c63d06a047ec9cf7f0bee5fed854c1b84 (diff) | |
download | FreeBSD-src-ea9b26bc94ee4b76cecbc4dd120898f7adeffb54.zip FreeBSD-src-ea9b26bc94ee4b76cecbc4dd120898f7adeffb54.tar.gz |
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.)
-rw-r--r-- | sys/libkern/scanc.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/sys/libkern/scanc.c b/sys/libkern/scanc.c index 0abc222..6f637dd 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); |