1 /* Return codes: 1 - ok, 0 - ignore, other - error. */ 2 static int arch_get_scno(struct tcb * tcp)3arch_get_scno(struct tcb *tcp) 4 { 5 kernel_ulong_t scno = 0; 6 7 switch (aarch64_io.iov_len) { 8 case sizeof(aarch64_regs): 9 /* We are in 64-bit mode */ 10 scno = aarch64_regs.regs[8]; 11 break; 12 case sizeof(arm_regs): 13 /* We are in 32-bit mode */ 14 /* Note: we don't support OABI, unlike 32-bit ARM build */ 15 scno = arm_regs.ARM_r7; 16 break; 17 } 18 19 tcp->scno = scno; 20 return 1; 21 } 22