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 codes: 1 - ok, 0 - ignore, other - error. */
9 static int
10 arch_get_scno(struct tcb *tcp)
11 {
12 unsigned int currpers;
13
14 #ifdef __tilepro__
15 currpers = 1;
16 #else
17 # ifndef PT_FLAGS_COMPAT
18 # define PT_FLAGS_COMPAT 0x10000 /* from Linux 3.8 on */
19 # endif
20 if (tile_regs.flags & PT_FLAGS_COMPAT)
21 currpers = 1;
22 else
23 currpers = 0;
24 #endif
25 update_personality(tcp, currpers);
26 tcp->scno = tile_regs.regs[10];
27
28 return 1;
29 }