blob: 8f8978b6b3a4d3903f27f4bfab99d40d248f2058 [file] [log] [blame]
Dmitry V. Levin0c8c5c92015-11-29 00:06:45 +00001static void
2get_error(struct tcb *tcp, const bool check_errno)
3{
Dmitry V. Levin552f2f62015-12-27 00:18:51 +00004 if (sparc_regs.tstate & 0x1100000000UL) {
Dmitry V. Levin0c8c5c92015-11-29 00:06:45 +00005 tcp->u_rval = -1;
6 tcp->u_error = sparc_regs.u_regs[U_REG_O0];
7 } else {
8 tcp->u_rval = sparc_regs.u_regs[U_REG_O0];
9 }
Dmitry V. Levind70d1c42015-03-22 22:13:55 +000010}