1 /*
2 * Copyright (c) 2015-2021 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 unsigned long *arc_args = &arc_regs.scratch.r0;
13
14 for (unsigned int i = 0; i < MAX_ARGS; ++i)
15 tcp->u_arg[i] = *arc_args--;
16 return 1;
17 }