(root)/
strace-6.5/
src/
linux/
sparc/
set_scno.c
       1  /*
       2   * Copyright (c) 2016-2021 The strace developers.
       3   * All rights reserved.
       4   *
       5   * SPDX-License-Identifier: LGPL-2.1-or-later
       6   */
       7  
       8  /*
       9   * Reloading the syscall number from %g1 register is supported
      10   * by linux kernel starting with commit v4.5-rc7~35^2~3.
      11   */
      12  
      13  static int
      14  arch_set_scno(struct tcb *tcp, kernel_ulong_t scno)
      15  {
      16  	if (ptrace_syscall_info_is_valid() && get_regs(tcp) < 0)
      17  		return -1;
      18  	sparc_regs.u_regs[U_REG_G1] = scno;
      19  	return set_regs(tcp->pid);
      20  }