summaryrefslogtreecommitdiff
path: root/linux/csky/get_scno.c
blob: 9d4397a94e4d4e2adbd5932a2727d3908026c7a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/*
 * Copyright (c) 2015-2019 The strace developers.
 * All rights reserved.
 *
 * SPDX-License-Identifier: LGPL-2.1-or-later
 */

/* Return codes: 1 - ok, 0 - ignore, other - error. */
static int
arch_get_scno(struct tcb *tcp)
{
#if defined(__CSKYABIV2__)
	tcp->scno = csky_regs.regs[3];
#else
	tcp->scno = csky_regs.a1;
#endif
	return 1;
}