mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-15 10:17:20 +00:00
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
This commit is contained in:
parent
c65da0c71e
commit
47886981ee
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=42429
@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user