• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 static int
arch_set_error(struct tcb * tcp)2 arch_set_error(struct tcb *tcp)
3 {
4 	ppc_regs.gpr[3] = tcp->u_error;
5 	ppc_regs.ccr |= 0x10000000;
6 #ifdef HAVE_GETREGS_OLD
7 	return upoke(tcp, sizeof(long) * PT_CCR, ppc_regs.ccr) ||
8 	       upoke(tcp, sizeof(long) * (PT_R0 + 3), ppc_regs.gpr[3]);
9 #else
10 	return set_regs(tcp->pid);
11 #endif
12 }
13 
14 static int
arch_set_success(struct tcb * tcp)15 arch_set_success(struct tcb *tcp)
16 {
17 	ppc_regs.gpr[3] = tcp->u_rval;
18 	ppc_regs.ccr &= ~0x10000000;
19 #ifdef HAVE_GETREGS_OLD
20 	return upoke(tcp, sizeof(long) * PT_CCR, ppc_regs.ccr) ||
21 	       upoke(tcp, sizeof(long) * (PT_R0 + 3), ppc_regs.gpr[3]);
22 #else
23 	return set_regs(tcp->pid);
24 #endif
25 }
26