scall64-o32.S (9f30a04d768f64280dc0c40b730746e82f298d88) scall64-o32.S (d218af78492a36a4ae607c08fedfb59258440314)
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 1995 - 2000, 2001 by Ralf Baechle
7 * Copyright (C) 1999, 2000 Silicon Graphics, Inc.
8 * Copyright (C) 2001 MIPS Technologies, Inc.

--- 73 unchanged lines hidden (view full) ---

82 PTR load_a7, bad_stack_a7
83 .previous
84
85 li t1, _TIF_WORK_SYSCALL_ENTRY
86 LONG_L t0, TI_FLAGS($28) # syscall tracing enabled?
87 and t0, t1, t0
88 bnez t0, trace_a_syscall
89
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 1995 - 2000, 2001 by Ralf Baechle
7 * Copyright (C) 1999, 2000 Silicon Graphics, Inc.
8 * Copyright (C) 2001 MIPS Technologies, Inc.

--- 73 unchanged lines hidden (view full) ---

82 PTR load_a7, bad_stack_a7
83 .previous
84
85 li t1, _TIF_WORK_SYSCALL_ENTRY
86 LONG_L t0, TI_FLAGS($28) # syscall tracing enabled?
87 and t0, t1, t0
88 bnez t0, trace_a_syscall
89
90syscall_common:
90 jalr t2 # Do The Real Thing (TM)
91
92 li t0, -EMAXERRNO - 1 # error?
93 sltu t0, t0, v0
94 sd t0, PT_R7(sp) # set error flag
95 beqz t0, 1f
96
97 ld t1, PT_R2(sp) # syscall number

--- 27 unchanged lines hidden (view full) ---

125 subu t1, v0, __NR_O32_Linux
126 move a1, v0
127 bnez t1, 1f /* __NR_syscall at offset 0 */
128 lw a1, PT_R4(sp) /* Arg1 for __NR_syscall case */
129 .set pop
130
1311: jal syscall_trace_enter
132
91 jalr t2 # Do The Real Thing (TM)
92
93 li t0, -EMAXERRNO - 1 # error?
94 sltu t0, t0, v0
95 sd t0, PT_R7(sp) # set error flag
96 beqz t0, 1f
97
98 ld t1, PT_R2(sp) # syscall number

--- 27 unchanged lines hidden (view full) ---

126 subu t1, v0, __NR_O32_Linux
127 move a1, v0
128 bnez t1, 1f /* __NR_syscall at offset 0 */
129 lw a1, PT_R4(sp) /* Arg1 for __NR_syscall case */
130 .set pop
131
1321: jal syscall_trace_enter
133
133 bltz v0, 2f # seccomp failed? Skip syscall
134 bltz v0, 1f # seccomp failed? Skip syscall
134
135
135 move t0, s0
136 move t2, s0
136 RESTORE_STATIC
137 ld a0, PT_R4(sp) # Restore argument registers
138 ld a1, PT_R5(sp)
139 ld a2, PT_R6(sp)
140 ld a3, PT_R7(sp)
141 ld a4, PT_R8(sp)
142 ld a5, PT_R9(sp)
143 ld a6, PT_R10(sp)
144 ld a7, PT_R11(sp) # For indirect syscalls
137 RESTORE_STATIC
138 ld a0, PT_R4(sp) # Restore argument registers
139 ld a1, PT_R5(sp)
140 ld a2, PT_R6(sp)
141 ld a3, PT_R7(sp)
142 ld a4, PT_R8(sp)
143 ld a5, PT_R9(sp)
144 ld a6, PT_R10(sp)
145 ld a7, PT_R11(sp) # For indirect syscalls
145 jalr t0
146 j syscall_common
146
147
147 li t0, -EMAXERRNO - 1 # error?
148 sltu t0, t0, v0
149 sd t0, PT_R7(sp) # set error flag
150 beqz t0, 1f
1481: j syscall_exit
151
149
152 ld t1, PT_R2(sp) # syscall number
153 dnegu v0 # error
154 sd t1, PT_R0(sp) # save it for syscall restarting
1551: sd v0, PT_R2(sp) # result
156
1572: j syscall_exit
158
159/* ------------------------------------------------------------------------ */
160
161 /*
162 * The stackpointer for a call with more than 4 arguments is bad.
163 */
164bad_stack:
165 li v0, EFAULT
166 sd v0, PT_R2(sp)

--- 412 unchanged lines hidden (view full) ---

579 PTR sys_sched_setattr
580 PTR sys_sched_getattr /* 4350 */
581 PTR sys_renameat2
582 PTR sys_seccomp
583 PTR sys_getrandom
584 PTR sys_memfd_create
585 PTR sys_bpf /* 4355 */
586 PTR compat_sys_execveat
150/* ------------------------------------------------------------------------ */
151
152 /*
153 * The stackpointer for a call with more than 4 arguments is bad.
154 */
155bad_stack:
156 li v0, EFAULT
157 sd v0, PT_R2(sp)

--- 412 unchanged lines hidden (view full) ---

570 PTR sys_sched_setattr
571 PTR sys_sched_getattr /* 4350 */
572 PTR sys_renameat2
573 PTR sys_seccomp
574 PTR sys_getrandom
575 PTR sys_memfd_create
576 PTR sys_bpf /* 4355 */
577 PTR compat_sys_execveat
578 PTR sys_userfaultfd
579 PTR sys_membarrier
587 .size sys32_call_table,.-sys32_call_table
580 .size sys32_call_table,.-sys32_call_table