Path: blob/main/sys/amd64/linux32/linux32_locore.asm
39507 views
1#include "linux32_assym.h" /* system definitions */2#include <machine/asmacros.h> /* miscellaneous asm macros */34#include <amd64/linux32/linux32_syscall.h> /* system call numbers */56.data78.globl linux_platform9linux_platform:10.asciz "i686"1112.text13.code321415ENTRY(linux32_vdso_sigcode)16.cfi_startproc17.cfi_signal_frame18.cfi_def_cfa %esp, LINUX_SIGF_SC19.cfi_offset %gs, L_SC_GS20.cfi_offset %fs, L_SC_FS21.cfi_offset %es, L_SC_ES22.cfi_offset %ds, L_SC_DS23.cfi_offset %cs, L_SC_CS24.cfi_offset %ss, L_SC_SS25#ifdef __clang__26.cfi_offset %flags, L_SC_EFLAGS27#else28.cfi_offset %eflags, L_SC_EFLAGS29#endif30.cfi_offset %edi, L_SC_EDI31.cfi_offset %esi, L_SC_ESI32.cfi_offset %ebp, L_SC_EBP33.cfi_offset %ebx, L_SC_EBX34.cfi_offset %edx, L_SC_EDX35.cfi_offset %ecx, L_SC_ECX36.cfi_offset %eax, L_SC_EAX37.cfi_offset %eip, L_SC_EIP38.cfi_offset %esp, L_SC_ESP3940movl %esp, %ebx /* sigframe for sigreturn */41call *%edi /* call signal handler */42popl %eax /* gcc unwind code need this */43.cfi_def_cfa %esp, LINUX_SIGF_SC-444movl $LINUX32_SYS_linux_sigreturn, %eax45int $0x80460: jmp 0b47.cfi_endproc48END(linux32_vdso_sigcode)495051ENTRY(linux32_vdso_rt_sigcode)52.cfi_startproc53.cfi_signal_frame54.cfi_def_cfa %esp, LINUX_RT_SIGF_UC + LINUX_RT_SIGF_SC55.cfi_offset %gs, L_SC_GS56.cfi_offset %fs, L_SC_FS57.cfi_offset %es, L_SC_ES58.cfi_offset %ds, L_SC_DS59.cfi_offset %cs, L_SC_CS60.cfi_offset %ss, L_SC_SS61#ifdef __clang__62.cfi_offset %flags, L_SC_EFLAGS63#else64.cfi_offset %eflags, L_SC_EFLAGS65#endif66.cfi_offset %edi, L_SC_EDI67.cfi_offset %esi, L_SC_ESI68.cfi_offset %ebp, L_SC_EBP69.cfi_offset %ebx, L_SC_EBX70.cfi_offset %edx, L_SC_EDX71.cfi_offset %ecx, L_SC_ECX72.cfi_offset %eax, L_SC_EAX73.cfi_offset %eip, L_SC_EIP74.cfi_offset %esp, L_SC_ESP7576leal LINUX_RT_SIGF_UC(%esp), %ebx /* linux ucontext for rt_sigreturn */77call *%edi /* call signal handler */78movl $LINUX32_SYS_linux_rt_sigreturn, %eax79int $0x80800: jmp 0b81.cfi_endproc82END(linux32_vdso_rt_sigcode)8384ENTRY(__kernel_sigreturn)85.cfi_startproc86.cfi_signal_frame87movl %esp, %ebx /* sigframe for sigreturn */88call *%edi /* call signal handler */89popl %eax /* gcc unwind code need this */90movl $LINUX32_SYS_linux_sigreturn, %eax91int $0x80920: jmp 0b93.cfi_endproc94END(__kernel_sigreturn)9596ENTRY(__kernel_rt_sigreturn)97.cfi_startproc98.cfi_signal_frame99leal LINUX_RT_SIGF_UC(%esp), %ebx /* linux ucontext for rt_sigreturn */100call *%edi /* call signal handler */101movl $LINUX32_SYS_linux_rt_sigreturn, %eax102int $0x801030: jmp 0b104.cfi_endproc105END(__kernel_rt_sigreturn)106107ENTRY(__kernel_vsyscall)108.cfi_startproc109int $0x80110ret111.cfi_endproc112END(__kernel_vsyscall)113114#if 0115.section .note.Linux, "a",@note116.long 2f - 1f /* namesz */117.balign 4118.long 4f - 3f /* descsz */119.long 01201:121.asciz "Linux"1222:123.balign 41243:125.long LINUX_VERSION_CODE1264:127.balign 4128.previous129#endif130131132