From 69095f699e5b796dc3261b1252add2af38b4439f Mon Sep 17 00:00:00 2001 From: bde Date: Sat, 9 Jan 1999 13:50:52 +0000 Subject: 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. --- sys/i386/isa/sound/audio.c | 29 ----------------------------- 1 file changed, 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) { -- cgit v1.1