• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* Return codes: 1 - ok, 0 - ignore, other - error. */
2 static int
arch_get_scno(struct tcb * tcp)3 arch_get_scno(struct tcb *tcp)
4 {
5 	tcp->scno = ppc_regs.gpr[0];
6 	/*
7 	 * Check for 64/32 bit mode.
8 	 * Embedded implementations covered by Book E extension of PPC use
9 	 * bit 0 (CM) of 32-bit Machine state register (MSR).
10 	 * Other implementations use bit 0 (SF) of 64-bit MSR.
11 	 */
12 	unsigned int currpers = (ppc_regs.msr & 0x8000000080000000) ? 0 : 1;
13 	update_personality(tcp, currpers);
14 	return 1;
15 }
16