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 long 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 update_personality(tcp, 0); 12 break; 13 case sizeof(arm_regs): 14 /* We are in 32-bit mode */ 15 /* Note: we don't support OABI, unlike 32-bit ARM build */ 16 scno = arm_regs.ARM_r7; 17 scno = shuffle_scno(scno); 18 update_personality(tcp, 1); 19 break; 20 } 21 22 tcp->scno = scno; 23 return 1; 24 } 25