Removed buggy, `#if 0'ed asm version of translate_bytes() instead of

fixing it.  See rev.1.22 of ../sound/audio.c for fixes.  When both
the C version and the asm version are inlined, and everything is cached,
the asm version is 1.75 times slower than the C version on P5's.  On
K6's, it is only 1.25 times slower.
This commit is contained in:
Bruce Evans 1999-01-09 13:43:09 +00:00
parent 47886981ee
commit d18c16d45b

View File

@ -1505,7 +1505,6 @@ change_bits(mixer_tab *t, u_char *regval, int dev, int chn, int newval)
* full-duplex)
*/
#if 1
void
translate_bytes (u_char *table, u_char *buff, int n)
{
@ -1517,22 +1516,5 @@ translate_bytes (u_char *table, u_char *buff, int n)
for (i = 0; i < n; ++i)
buff[i] = table[buff[i]];
}
#else
/* inline */
void
translate_bytes (const void *table, void *buff, int n)
{
if (n > 0) {
__asm__ ( " cld\n"
"1: lodsb\n"
" xlatb\n"
" stosb\n"
" loop 1b\n":
: "b" (table), "c" (n), "D" (buff), "S" (buff)
: "bx", "cx", "di", "si", "ax");
}
}
#endif
#endif /* NPCM > 0 */