1#define get_error arm_get_error
2#include "arm/get_error.c"
3#undef get_error
4
5static void
6get_error(struct tcb *tcp, const bool check_errno)
7{
8	if (tcp->currpers == 1) {
9		arm_get_error(tcp, check_errno);
10		return;
11	}
12
13	if (check_errno && is_negated_errno(aarch64_regs.regs[0])) {
14		tcp->u_rval = -1;
15		tcp->u_error = -aarch64_regs.regs[0];
16	} else {
17		tcp->u_rval = aarch64_regs.regs[0];
18	}
19}
20