Changeset View
Changeset View
Standalone View
Standalone View
sys/amd64/linux/linux_locore.asm
Show All 11 Lines | linux_platform: | ||||
.asciz "x86_64" | .asciz "x86_64" | ||||
.text | .text | ||||
/* | /* | ||||
* To avoid excess stack frame the signal trampoline code emulates | * To avoid excess stack frame the signal trampoline code emulates | ||||
* the 'call' instruction. | * the 'call' instruction. | ||||
*/ | */ | ||||
NON_GPROF_ENTRY(linux_rt_sigcode) | ENTRY(linux_rt_sigcode) | ||||
movq %rsp, %rbx /* preserve sigframe */ | movq %rsp, %rbx /* preserve sigframe */ | ||||
call .getip | call .getip | ||||
.getip: | .getip: | ||||
popq %rax | popq %rax | ||||
add $.startrtsigcode-.getip, %rax /* ret address */ | add $.startrtsigcode-.getip, %rax /* ret address */ | ||||
pushq %rax | pushq %rax | ||||
jmp *LINUX_RT_SIGF_HANDLER(%rbx) | jmp *LINUX_RT_SIGF_HANDLER(%rbx) | ||||
.startrtsigcode: | .startrtsigcode: | ||||
movq $LINUX_SYS_linux_rt_sigreturn,%rax /* linux_rt_sigreturn() */ | movq $LINUX_SYS_linux_rt_sigreturn,%rax /* linux_rt_sigreturn() */ | ||||
syscall /* enter kernel with args */ | syscall /* enter kernel with args */ | ||||
hlt | hlt | ||||
.endrtsigcode: | .endrtsigcode: | ||||
0: jmp 0b | 0: jmp 0b | ||||
NON_GPROF_ENTRY(__vdso_clock_gettime) | ENTRY(__vdso_clock_gettime) | ||||
movq $LINUX_SYS_linux_clock_gettime,%rax | movq $LINUX_SYS_linux_clock_gettime,%rax | ||||
syscall | syscall | ||||
ret | ret | ||||
.weak clock_gettime | .weak clock_gettime | ||||
.set clock_gettime, __vdso_clock_gettime | .set clock_gettime, __vdso_clock_gettime | ||||
NON_GPROF_ENTRY(__vdso_time) | ENTRY(__vdso_time) | ||||
movq $LINUX_SYS_linux_time,%rax | movq $LINUX_SYS_linux_time,%rax | ||||
syscall | syscall | ||||
ret | ret | ||||
.weak time | .weak time | ||||
.set time, __vdso_time | .set time, __vdso_time | ||||
NON_GPROF_ENTRY(__vdso_gettimeofday) | ENTRY(__vdso_gettimeofday) | ||||
movq $LINUX_SYS_gettimeofday,%rax | movq $LINUX_SYS_gettimeofday,%rax | ||||
syscall | syscall | ||||
ret | ret | ||||
.weak gettimeofday | .weak gettimeofday | ||||
.set gettimeofday, __vdso_gettimeofday | .set gettimeofday, __vdso_gettimeofday | ||||
NON_GPROF_ENTRY(__vdso_getcpu) | ENTRY(__vdso_getcpu) | ||||
movq $-38,%rax /* not implemented */ | movq $-38,%rax /* not implemented */ | ||||
ret | ret | ||||
.weak getcpu | .weak getcpu | ||||
.set getcpu, __vdso_getcpu | .set getcpu, __vdso_getcpu | ||||
#if 0 | #if 0 | ||||
.section .note.Linux, "a",@note | .section .note.Linux, "a",@note | ||||
.long 2f - 1f /* namesz */ | .long 2f - 1f /* namesz */ | ||||
▲ Show 20 Lines • Show All 44 Lines • Show Last 20 Lines |