sys32.S (dd19958ce8417f4b25d29c7619dbc3929ca8d6d0) sys32.S (a00a700bdea86442c0d63a6bc7cc9d03a47e1d09)
1/* SPDX-License-Identifier: GPL-2.0 */
2/*
3 * sys32.S: I-cache tricks for 32-bit compatibility layer simple
4 * conversions.
5 *
6 * Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu)
7 * Copyright (C) 1998 Jakub Jelinek (jj@ultra.linux.cz)
8 */
9
10#include <asm/errno.h>
11
12/* NOTE: call as jump breaks return stack, we have to avoid that */
13
14 .text
15
1/* SPDX-License-Identifier: GPL-2.0 */
2/*
3 * sys32.S: I-cache tricks for 32-bit compatibility layer simple
4 * conversions.
5 *
6 * Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu)
7 * Copyright (C) 1998 Jakub Jelinek (jj@ultra.linux.cz)
8 */
9
10#include <asm/errno.h>
11
12/* NOTE: call as jump breaks return stack, we have to avoid that */
13
14 .text
15
16#define SIGN1(STUB,SYSCALL,REG1) \
17 .align 32; \
18 .globl STUB; \
19STUB: sethi %hi(SYSCALL), %g1; \
20 jmpl %g1 + %lo(SYSCALL), %g0; \
21 sra REG1, 0, REG1
22
23#define SIGN2(STUB,SYSCALL,REG1,REG2) \
24 .align 32; \
25 .globl STUB; \
26STUB: sethi %hi(SYSCALL), %g1; \
27 sra REG1, 0, REG1; \
28 jmpl %g1 + %lo(SYSCALL), %g0; \
29 sra REG2, 0, REG2
30
31#define SIGN3(STUB,SYSCALL,REG1,REG2,REG3) \
32 .align 32; \
33 .globl STUB; \
34STUB: sra REG1, 0, REG1; \
35 sethi %hi(SYSCALL), %g1; \
36 sra REG2, 0, REG2; \
37 jmpl %g1 + %lo(SYSCALL), %g0; \
38 sra REG3, 0, REG3
39
40SIGN1(sys32_readahead, compat_sys_readahead, %o0)
41SIGN2(sys32_fadvise64, compat_sys_fadvise64, %o0, %o4)
42SIGN2(sys32_fadvise64_64, compat_sys_fadvise64_64, %o0, %o5)
43
44 .globl sys32_mmap2
45sys32_mmap2:
46 sethi %hi(sys_mmap), %g1
47 jmpl %g1 + %lo(sys_mmap), %g0
48 sllx %o5, 12, %o5
49
50 .align 32
51 .globl sys32_socketcall

--- 218 unchanged lines hidden ---
16 .globl sys32_mmap2
17sys32_mmap2:
18 sethi %hi(sys_mmap), %g1
19 jmpl %g1 + %lo(sys_mmap), %g0
20 sllx %o5, 12, %o5
21
22 .align 32
23 .globl sys32_socketcall

--- 218 unchanged lines hidden ---