1 /*
2 * Copyright (c) 2021-2022 The strace developers.
3 * All rights reserved.
4 *
5 * SPDX-License-Identifier: LGPL-2.1-or-later
6 */
7
8 /* Return -1 on error or 1 on success (never 0!). */
9 static int
10 arch_get_syscall_args(struct tcb *tcp)
11 {
12 tcp->u_arg[0] = loongarch_regs.orig_a0;
13 tcp->u_arg[1] = loongarch_regs.regs[5];
14 tcp->u_arg[2] = loongarch_regs.regs[6];
15 tcp->u_arg[3] = loongarch_regs.regs[7];
16 tcp->u_arg[4] = loongarch_regs.regs[8];
17 tcp->u_arg[5] = loongarch_regs.regs[9];
18 return 1;
19 }