Commit 2e4c6693 authored by Kevin Wolf's avatar Kevin Wolf

libc: Ein paar memory-Clobbers mehr für Syscalls

! libc: Keine Ahnung, ob es überall nötig ist, aber ohne memory-Clobber
  gibt zumindest mem_dma_allocate() nicht unbedingt die physische
  Adresse zurück, die alloziert worden ist. Also lieber mal an ein paar
  Stellen mehr clobbern.
Signed-off-by: Kevin Wolf's avatarKevin Wolf <kevin@tyndur.org>
parent 971d583a
......@@ -40,7 +40,9 @@ dma_mem_ptr_t mem_dma_allocate(uint32_t size, uint32_t flags)
"mov %1, %%eax;"
"int $0x30;"
"add $0xc, %%esp;"
: "=a" (ptr.virt) : "i" (SYSCALL_MEM_ALLOCATE), "r" (size), "r" (flags), "r" (&ptr.phys));
: "=a" (ptr.virt)
: "i" (SYSCALL_MEM_ALLOCATE), "r" (size), "r" (flags), "r" (&ptr.phys)
: "memory");
return ptr;
}
......
......@@ -36,7 +36,7 @@ void mutex_lock(mutex_t* mutex)
"pushl %1;"
"int $0x30;"
"add $0x4, %%esp;"
: : "a" (SYSCALL_MUTEX_LOCK), "r" (mutex));
: : "a" (SYSCALL_MUTEX_LOCK), "r" (mutex) : "memory");
}
void mutex_unlock(mutex_t* mutex)
......@@ -45,5 +45,5 @@ void mutex_unlock(mutex_t* mutex)
"pushl %1;"
"int $0x30;"
"add $0x4, %%esp;"
: : "a" (SYSCALL_MUTEX_UNLOCK), "r" (mutex));
: : "a" (SYSCALL_MUTEX_UNLOCK), "r" (mutex) : "memory");
}
......@@ -42,7 +42,8 @@ int bios_int(int intr, vm86_regs_t* regs, uint32_t* shm)
"int $0x30;"
"add $0xc, %%esp;"
: "=a"(result)
: "i" (SYSCALL_VM86_BIOS_INT), "r" (intr), "r"(regs), "r"(shm));
: "i" (SYSCALL_VM86_BIOS_INT), "r" (intr), "r"(regs), "r"(shm)
: "memory");
return result;
}
......@@ -57,7 +58,7 @@ bool vm86_int(vm86_regs_t *regs, uint32_t *shm)
"mov %1, %%eax;"
"int $0x30;"
"add $0x8, %%esp;"
: "=a"(result): "i" (SYSCALL_VM86), "r"(regs), "r"(shm));
: "=a"(result): "i" (SYSCALL_VM86), "r"(regs), "r"(shm) : "memory");
if (result == -ENOSYS) {
return bios_int(0x10, regs, shm);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment