summaryrefslogtreecommitdiffstats
path: root/sys/i386/isa/sound
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1999-01-09 13:27:37 +0000
committerbde <bde@FreeBSD.org>1999-01-09 13:27:37 +0000
commit4c2d702e3a374bf88400dcc51a081cb840be21ea (patch)
treed7268813267e7376ed73c71d1baa2b388e5a73c1 /sys/i386/isa/sound
parent97a75ce74241ef194ab458a10d1e24e1de0e27cf (diff)
downloadFreeBSD-src-4c2d702e3a374bf88400dcc51a081cb840be21ea.zip
FreeBSD-src-4c2d702e3a374bf88400dcc51a081cb840be21ea.tar.gz
Don't put operands in clobber lists, since this is dubious for old
versions of gcc and broken for current versions of egcs. The asm here (for translate_bytes()) is now an interesting example of one that needs to be volatile to work. Fixed missing "memory" in the clobber list for translate_bytes(). Submitted by: "John S. Dyson" <dyson@iquest.net> but rewritten by me
Diffstat (limited to 'sys/i386/isa/sound')
-rw-r--r--sys/i386/isa/sound/audio.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/i386/isa/sound/audio.c b/sys/i386/isa/sound/audio.c
index 31f952e..8c15d79 100644
--- a/sys/i386/isa/sound/audio.c
+++ b/sys/i386/isa/sound/audio.c
@@ -166,13 +166,15 @@ extern __inline void
translate_bytes(const void *table, void *buff, int n)
{
if (n > 0) {
- __asm__("cld\n"
+ __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)
- :"bx", "cx", "di", "si", "ax");
+ "loop 1b\n\t"
+ : "=b" (table), "=c" (n), "=D" (buff), "=S" (buff)
+ : "0" (table), "1" (n), "2" (buff), "3" (buff)
+ : "ax", "memory");
}
}
OpenPOWER on IntegriCloud