1 /* SPDX-License-Identifier: GPL-2.0 */
3 * AArch32 sigreturn code.
4 * Based on the kuser helpers in arch/arm/kernel/entry-armv.S.
6 * Copyright (C) 2005-2011 Nicolas Pitre <nico@fluxnic.net>
7 * Copyright (C) 2012-2018 ARM Ltd.
9 * For ARM syscalls, the syscall number has to be loaded into r7.
10 * We do not support an OABI userspace.
12 * For Thumb syscalls, we also pass the syscall number via r7. We therefore
13 * need two 16-bit instructions.
16 #include <asm/unistd_compat_32.h>
19 .globl __aarch32_sigret_code_start
20 __aarch32_sigret_code_start:
25 .byte __NR_compat32_sigreturn, 0x70, 0xa0, 0xe3 // mov r7, #__NR_compat32_sigreturn
26 .byte __NR_compat32_sigreturn, 0x00, 0x00, 0xef // svc #__NR_compat32_sigreturn
31 .byte __NR_compat32_sigreturn, 0x27 // svc #__NR_compat32_sigreturn
32 .byte __NR_compat32_sigreturn, 0xdf // mov r7, #__NR_compat32_sigreturn
37 .byte __NR_compat32_rt_sigreturn, 0x70, 0xa0, 0xe3 // mov r7, #__NR_compat32_rt_sigreturn
38 .byte __NR_compat32_rt_sigreturn, 0x00, 0x00, 0xef // svc #__NR_compat32_rt_sigreturn
43 .byte __NR_compat32_rt_sigreturn, 0x27 // svc #__NR_compat32_rt_sigreturn
44 .byte __NR_compat32_rt_sigreturn, 0xdf // mov r7, #__NR_compat32_rt_sigreturn
46 .globl __aarch32_sigret_code_end
47 __aarch32_sigret_code_end: