blob: f9b5e7d710ed56e8bfcebba0dab2b84ede5520d5 [file] [log] [blame]
Dmitry V. Levin16510512015-11-30 01:46:52 +00001/* Return codes: 1 - ok, 0 - ignore, other - error. */
2static int
3arch_get_scno(struct tcb *tcp)
4{
5 tcp->scno = mips_REG_V0;
Dmitry V. Levind70d1c42015-03-22 22:13:55 +00006
Dmitry V. Levin16510512015-11-30 01:46:52 +00007 if (!SCNO_IN_RANGE(tcp->scno)) {
8 if (mips_REG_A3 == 0 || mips_REG_A3 == (uint64_t) -1) {
9 if (debug_flag)
10 error_msg("stray syscall exit: v0 = %ld",
11 tcp->scno);
12 return 0;
13 }
Dmitry V. Levind70d1c42015-03-22 22:13:55 +000014 }
Dmitry V. Levin16510512015-11-30 01:46:52 +000015
16 return 1;
Dmitry V. Levind70d1c42015-03-22 22:13:55 +000017}