116510517f10757355944ee5c07285ba2a8b61affDmitry V. Levin/* Return codes: 1 - ok, 0 - ignore, other - error. */ 216510517f10757355944ee5c07285ba2a8b61affDmitry V. Levinstatic int 316510517f10757355944ee5c07285ba2a8b61affDmitry V. Levinarch_get_scno(struct tcb *tcp) 416510517f10757355944ee5c07285ba2a8b61affDmitry V. Levin{ 516510517f10757355944ee5c07285ba2a8b61affDmitry V. Levin tcp->scno = mips_REG_V0; 6d70d1c4aa6b9b2f4713d79f442dbf66a3f702c9bDmitry V. Levin 716510517f10757355944ee5c07285ba2a8b61affDmitry V. Levin if (!SCNO_IN_RANGE(tcp->scno)) { 816510517f10757355944ee5c07285ba2a8b61affDmitry V. Levin if (mips_REG_A3 == 0 || mips_REG_A3 == (uint64_t) -1) { 916510517f10757355944ee5c07285ba2a8b61affDmitry V. Levin if (debug_flag) 1016510517f10757355944ee5c07285ba2a8b61affDmitry V. Levin error_msg("stray syscall exit: v0 = %ld", 1116510517f10757355944ee5c07285ba2a8b61affDmitry V. Levin tcp->scno); 1216510517f10757355944ee5c07285ba2a8b61affDmitry V. Levin return 0; 1316510517f10757355944ee5c07285ba2a8b61affDmitry V. Levin } 14d70d1c4aa6b9b2f4713d79f442dbf66a3f702c9bDmitry V. Levin } 1516510517f10757355944ee5c07285ba2a8b61affDmitry V. Levin 1616510517f10757355944ee5c07285ba2a8b61affDmitry V. Levin return 1; 17d70d1c4aa6b9b2f4713d79f442dbf66a3f702c9bDmitry V. Levin} 18