scall64-n32.S (9f30a04d768f64280dc0c40b730746e82f298d88) | scall64-n32.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, 96, 97, 98, 99, 2000, 01 by Ralf Baechle 7 * Copyright (C) 1999, 2000 Silicon Graphics, Inc. 8 * Copyright (C) 2001 MIPS Technologies, Inc. --- 38 unchanged lines hidden (view full) --- 47 48 sd a3, PT_R26(sp) # save a3 for syscall restarting 49 50 li t1, _TIF_WORK_SYSCALL_ENTRY 51 LONG_L t0, TI_FLAGS($28) # syscall tracing enabled? 52 and t0, t1, t0 53 bnez t0, n32_syscall_trace_entry 54 | 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, 96, 97, 98, 99, 2000, 01 by Ralf Baechle 7 * Copyright (C) 1999, 2000 Silicon Graphics, Inc. 8 * Copyright (C) 2001 MIPS Technologies, Inc. --- 38 unchanged lines hidden (view full) --- 47 48 sd a3, PT_R26(sp) # save a3 for syscall restarting 49 50 li t1, _TIF_WORK_SYSCALL_ENTRY 51 LONG_L t0, TI_FLAGS($28) # syscall tracing enabled? 52 and t0, t1, t0 53 bnez t0, n32_syscall_trace_entry 54 |
55syscall_common: |
|
55 jalr t2 # Do The Real Thing (TM) 56 57 li t0, -EMAXERRNO - 1 # error? 58 sltu t0, t0, v0 59 sd t0, PT_R7(sp) # set error flag 60 beqz t0, 1f 61 62 ld t1, PT_R2(sp) # syscall number --- 7 unchanged lines hidden (view full) --- 70 71n32_syscall_trace_entry: 72 SAVE_STATIC 73 move s0, t2 74 move a0, sp 75 move a1, v0 76 jal syscall_trace_enter 77 | 56 jalr t2 # Do The Real Thing (TM) 57 58 li t0, -EMAXERRNO - 1 # error? 59 sltu t0, t0, v0 60 sd t0, PT_R7(sp) # set error flag 61 beqz t0, 1f 62 63 ld t1, PT_R2(sp) # syscall number --- 7 unchanged lines hidden (view full) --- 71 72n32_syscall_trace_entry: 73 SAVE_STATIC 74 move s0, t2 75 move a0, sp 76 move a1, v0 77 jal syscall_trace_enter 78 |
78 bltz v0, 2f # seccomp failed? Skip syscall | 79 bltz v0, 1f # seccomp failed? Skip syscall |
79 | 80 |
80 move t0, s0 | 81 move t2, s0 |
81 RESTORE_STATIC 82 ld a0, PT_R4(sp) # Restore argument registers 83 ld a1, PT_R5(sp) 84 ld a2, PT_R6(sp) 85 ld a3, PT_R7(sp) 86 ld a4, PT_R8(sp) 87 ld a5, PT_R9(sp) | 82 RESTORE_STATIC 83 ld a0, PT_R4(sp) # Restore argument registers 84 ld a1, PT_R5(sp) 85 ld a2, PT_R6(sp) 86 ld a3, PT_R7(sp) 87 ld a4, PT_R8(sp) 88 ld a5, PT_R9(sp) |
88 jalr t0 | 89 j syscall_common |
89 | 90 |
90 li t0, -EMAXERRNO - 1 # error? 91 sltu t0, t0, v0 92 sd t0, PT_R7(sp) # set error flag 93 beqz t0, 1f | 911: j syscall_exit |
94 | 92 |
95 ld t1, PT_R2(sp) # syscall number 96 dnegu v0 # error 97 sd t1, PT_R0(sp) # save it for syscall restarting 981: sd v0, PT_R2(sp) # result 99 1002: j syscall_exit 101 | |
102not_n32_scall: 103 /* This is not an n32 compatibility syscall, pass it on to 104 the n64 syscall handlers. */ 105 j handle_sys64 106 107 END(handle_sysn32) 108 109 .type sysn32_call_table, @object --- 314 unchanged lines hidden (view full) --- 424 PTR sys_sched_setattr 425 PTR sys_sched_getattr 426 PTR sys_renameat2 /* 6315 */ 427 PTR sys_seccomp 428 PTR sys_getrandom 429 PTR sys_memfd_create 430 PTR sys_bpf 431 PTR compat_sys_execveat /* 6320 */ | 93not_n32_scall: 94 /* This is not an n32 compatibility syscall, pass it on to 95 the n64 syscall handlers. */ 96 j handle_sys64 97 98 END(handle_sysn32) 99 100 .type sysn32_call_table, @object --- 314 unchanged lines hidden (view full) --- 415 PTR sys_sched_setattr 416 PTR sys_sched_getattr 417 PTR sys_renameat2 /* 6315 */ 418 PTR sys_seccomp 419 PTR sys_getrandom 420 PTR sys_memfd_create 421 PTR sys_bpf 422 PTR compat_sys_execveat /* 6320 */ |
423 PTR sys_userfaultfd 424 PTR sys_membarrier |
|
432 .size sysn32_call_table,.-sysn32_call_table | 425 .size sysn32_call_table,.-sysn32_call_table |