/*-1* SPDX-License-Identifier: BSD-2-Clause2*3* Copyright (c) 2015-2022 Dmitry Chagin <[email protected]>4*5* Redistribution and use in source and binary forms, with or without6* modification, are permitted provided that the following conditions7* are met:8* 1. Redistributions of source code must retain the above copyright9* notice, this list of conditions and the following disclaimer.10* 2. Redistributions in binary form must reproduce the above copyright11* notice, this list of conditions and the following disclaimer in the12* documentation and/or other materials provided with the distribution.13*14* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND15* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE16* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE17* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE18* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL19* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS20* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)21* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT22* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY23* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF24* SUCH DAMAGE.25*/2627#include "linux_assym.h" /* system definitions */28#include <machine/asmacros.h> /* miscellaneous asm macros */2930#include <amd64/linux/linux_syscall.h> /* system call numbers */3132.data3334.globl linux_platform35linux_platform:36.asciz "x86_64"3738.text3940ENTRY(linux_rt_sigcode)41.cfi_startproc42.cfi_signal_frame43.cfi_def_cfa %rsp, LINUX_RT_SIGF_SC44.cfi_offset %r8, L_SC_R845.cfi_offset %r9, L_SC_R946.cfi_offset %r10, L_SC_R1047.cfi_offset %r11, L_SC_R1148.cfi_offset %r12, L_SC_R1249.cfi_offset %r13, L_SC_R1350.cfi_offset %r14, L_SC_R1451.cfi_offset %r15, L_SC_R1552.cfi_offset %rdi, L_SC_RDI53.cfi_offset %rsi, L_SC_RSI54.cfi_offset %rbp, L_SC_RBP55.cfi_offset %rbx, L_SC_RBX56.cfi_offset %rdx, L_SC_RDX57.cfi_offset %rax, L_SC_RAX58.cfi_offset %rcx, L_SC_RCX59.cfi_offset %rip, L_SC_RIP60.cfi_offset %rsp, L_SC_RSP6162movq %rsp, %rbx /* rt_sigframe for rt_sigreturn */63call *%rcx /* call signal handler */64movq $LINUX_SYS_linux_rt_sigreturn, %rax65syscall660: hlt67jmp 0b68.cfi_endproc69END(linux_rt_sigcode)7071#if 072.section .note.Linux, "a",@note73.long 2f - 1f /* namesz */74.balign 475.long 4f - 3f /* descsz */76.long 0771:78.asciz "Linux"792:80.balign 4813:82.long LINUX_VERSION_CODE834:84.balign 485.previous86#endif878889