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.)
This commit is contained in:
Bruce Evans 2003-07-25 15:54:23 +00:00
parent 42203b623d
commit 4066649d5a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=118017

View File

@ -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);