diff options
Diffstat (limited to 'libgloss/arm')
-rw-r--r-- | libgloss/arm/syscalls.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libgloss/arm/syscalls.c b/libgloss/arm/syscalls.c index e890228..a215d7a 100644 --- a/libgloss/arm/syscalls.c +++ b/libgloss/arm/syscalls.c @@ -179,7 +179,9 @@ get_errno (void) #ifdef ARM_RDI_MONITOR return do_AngelSWI (AngelSWI_Reason_Errno, NULL); #else - asm ("swi %a0" :: "i" (SWI_GetErrno)); + register r0 asm("r0"); + asm ("swi %a1" : "=3Dr"(r0) : "i" (SWI_GetErrno)); + return r0; #endif } |