diff options
author | bde <bde@FreeBSD.org> | 1999-01-09 13:50:52 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1999-01-09 13:50:52 +0000 |
commit | 69095f699e5b796dc3261b1252add2af38b4439f (patch) | |
tree | ad886fe7aff7916362c24a980946554461c04b8c /sys/i386 | |
parent | 2616cfa856e38baf5cd8a677da514b87e17304d6 (diff) | |
download | FreeBSD-src-69095f699e5b796dc3261b1252add2af38b4439f.zip FreeBSD-src-69095f699e5b796dc3261b1252add2af38b4439f.tar.gz |
Removed the asm version of translate_bytes(). 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.
Diffstat (limited to 'sys/i386')
-rw-r--r-- | sys/i386/isa/sound/audio.c | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/sys/i386/isa/sound/audio.c b/sys/i386/isa/sound/audio.c index 8c15d79..d92dd49 100644 --- a/sys/i386/isa/sound/audio.c +++ b/sys/i386/isa/sound/audio.c @@ -57,15 +57,6 @@ static char *wr_dma_buf[MAX_AUDIO_DEV]; static int audio_format[MAX_AUDIO_DEV]; static int local_conversion[MAX_AUDIO_DEV]; -#if defined(NO_INLINE_ASM) || !defined(__i386__) -static void -translate_bytes(const u_char *table, u_char *buff, int n); - -#else -extern __inline void -translate_bytes(const void *table, void *buff, int n); -#endif - static int set_format(int dev, int fmt) { @@ -148,7 +139,6 @@ audio_release(int dev, struct fileinfo * file) } -#if defined(NO_INLINE_ASM) || !defined(__i386__) static void translate_bytes(const u_char *table, u_char *buff, int n) { @@ -161,25 +151,6 @@ translate_bytes(const u_char *table, u_char *buff, int n) buff[i] = table[buff[i]]; } -#else -extern __inline void -translate_bytes(const void *table, void *buff, int n) -{ - if (n > 0) { - __asm __volatile( - "cld\n" - "1:\tlodsb\n\t" - "xlatb\n\t" - "stosb\n\t" - "loop 1b\n\t" - : "=b" (table), "=c" (n), "=D" (buff), "=S" (buff) - : "0" (table), "1" (n), "2" (buff), "3" (buff) - : "ax", "memory"); - } -} - -#endif - int audio_write(int dev, struct fileinfo * file, snd_rw_buf * buf, int count) { |