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.h>
18 .globl __aarch32_sigret_code_start
19 __aarch32_sigret_code_start:
24 .byte __NR_compat_sigreturn, 0x70, 0xa0, 0xe3 // mov r7, #__NR_compat_sigreturn
25 .byte __NR_compat_sigreturn, 0x00, 0x00, 0xef // svc #__NR_compat_sigreturn
30 .byte __NR_compat_sigreturn, 0x27 // svc #__NR_compat_sigreturn
31 .byte __NR_compat_sigreturn, 0xdf // mov r7, #__NR_compat_sigreturn
36 .byte __NR_compat_rt_sigreturn, 0x70, 0xa0, 0xe3 // mov r7, #__NR_compat_rt_sigreturn
37 .byte __NR_compat_rt_sigreturn, 0x00, 0x00, 0xef // svc #__NR_compat_rt_sigreturn
42 .byte __NR_compat_rt_sigreturn, 0x27 // svc #__NR_compat_rt_sigreturn
43 .byte __NR_compat_rt_sigreturn, 0xdf // mov r7, #__NR_compat_rt_sigreturn
45 .globl __aarch32_sigret_code_end
46 __aarch32_sigret_code_end: