{
/* See [IA32-v2a] "IN". */
uint32_t data;
- asm volatile ("inl %0, %w1" : "=a" (data) : "d" (port));
+ asm volatile ("ind %0, %w1" : "=a" (data) : "d" (port));
return data;
}
insl (uint16_t port, void *addr, size_t cnt)
{
/* See [IA32-v2a] "INS". */
- asm volatile ("cld; repne insl"
+ asm volatile ("cld; repne insd"
: "=D" (addr), "=c" (cnt)
: "d" (port), "0" (addr), "1" (cnt)
: "memory", "cc");
outl (uint16_t port, uint32_t data)
{
/* See [IA32-v2b] "OUT". */
- asm volatile ("outl %w1, %0" : : "a" (data), "d" (port));
+ asm volatile ("outd %w1, %0" : : "a" (data), "d" (port));
}
/* Writes to PORT each 32-bit unit (word) of data in the CNT-word
outsl (uint16_t port, const void *addr, size_t cnt)
{
/* See [IA32-v2b] "OUTS". */
- asm volatile ("cld; repne outsl"
+ asm volatile ("cld; repne outsd"
: "=S" (addr), "=c" (cnt)
: "d" (port), "0" (addr), "1" (cnt)
: "cc");