linux syscall trashes rcx & r11
This commit is contained in:
4
lib.h
4
lib.h
@@ -13,7 +13,9 @@ static
|
||||
void write(uint64_t fileno, void *buffer, size_t len) {
|
||||
uint64_t a,d;
|
||||
asm volatile("syscall"
|
||||
:"=a"(a),"=d"(d):"a"(SYS_write),"D"(fileno),"S"(buffer),"d"(len):"memory");
|
||||
:"=a"(a),"=d"(d)
|
||||
:"a"(SYS_write),"D"(fileno),"S"(buffer),"d"(len)
|
||||
:"cc","memory","%rcx","%r11");
|
||||
}
|
||||
|
||||
[[noreturn]] static
|
||||
|
||||
Reference in New Issue
Block a user