(root)/
strace-6.5/
src/
linux/
mips/
get_scno.c
       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  	tcp->scno = mips_REG_V0;
      13  
      14  	if (!scno_in_range(tcp->scno)) {
      15  		if (mips_REG_A3 == 0 || mips_REG_A3 == (uint64_t) -1) {
      16  			debug_msg("stray syscall exit: v0 = %ld", tcp->scno);
      17  			return 0;
      18  		}
      19  	}
      20  
      21  	return 1;
      22  }