Dmitry V. Levin | 1651051 | 2015-11-30 01:46:52 +0000 | [diff] [blame] | 1 | /* Return codes: 1 - ok, 0 - ignore, other - error. */ |
| 2 | static int |
| 3 | arch_get_scno(struct tcb *tcp) |
| 4 | { |
| 5 | tcp->scno = mips_REG_V0; |
Dmitry V. Levin | d70d1c4 | 2015-03-22 22:13:55 +0000 | [diff] [blame] | 6 | |
Dmitry V. Levin | 1651051 | 2015-11-30 01:46:52 +0000 | [diff] [blame] | 7 | 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. Levin | d70d1c4 | 2015-03-22 22:13:55 +0000 | [diff] [blame] | 14 | } |
Dmitry V. Levin | 1651051 | 2015-11-30 01:46:52 +0000 | [diff] [blame] | 15 | |
| 16 | return 1; |
Dmitry V. Levin | d70d1c4 | 2015-03-22 22:13:55 +0000 | [diff] [blame] | 17 | } |