Changeset View
Changeset View
Standalone View
Standalone View
sys/amd64/ia32/ia32_exception.S
Show First 20 Lines • Show All 61 Lines • ▼ Show 20 Lines | IDTVEC(int0x80_syscall) | ||||
movq %rbp,TF_RBP(%rsp) | movq %rbp,TF_RBP(%rsp) | ||||
movq %r10,TF_R10(%rsp) | movq %r10,TF_R10(%rsp) | ||||
movq %r11,TF_R11(%rsp) | movq %r11,TF_R11(%rsp) | ||||
movq %r12,TF_R12(%rsp) | movq %r12,TF_R12(%rsp) | ||||
movq %r13,TF_R13(%rsp) | movq %r13,TF_R13(%rsp) | ||||
movq %r14,TF_R14(%rsp) | movq %r14,TF_R14(%rsp) | ||||
movq %r15,TF_R15(%rsp) | movq %r15,TF_R15(%rsp) | ||||
movl $TF_HASSEGS,TF_FLAGS(%rsp) | movl $TF_HASSEGS,TF_FLAGS(%rsp) | ||||
cld | pushfq | ||||
andl $~(PSL_D | PSL_AC),(%rsp) | |||||
popfq | |||||
jhb: Picking one at random. Is there a reason to think that pushf/andl/popf is better than… | |||||
FAKE_MCOUNT(TF_RIP(%rsp)) | FAKE_MCOUNT(TF_RIP(%rsp)) | ||||
movq %rsp, %rdi | movq %rsp, %rdi | ||||
call ia32_syscall | call ia32_syscall | ||||
MEXITCOUNT | MEXITCOUNT | ||||
jmp doreti | jmp doreti |
Picking one at random. Is there a reason to think that pushf/andl/popf is better than 'cld/clac'?
Ah to answer my own question (and for future readers): clac may not be supported on all processors but this pattern is.