aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Johnston <jjohnstn@redhat.com>2005-04-28 18:40:39 +0000
committerJeff Johnston <jjohnstn@redhat.com>2005-04-28 18:40:39 +0000
commite525f6d51a38d6648ebba2a2c2b25f31d7bfe5ce (patch)
treeae63fc62e846fbffad0a5e47d6b1f628c20254e9
parent5456408b8466470b135a0fc96dbc63a925244100 (diff)
downloadnewlib-e525f6d51a38d6648ebba2a2c2b25f31d7bfe5ce.zip
newlib-e525f6d51a38d6648ebba2a2c2b25f31d7bfe5ce.tar.gz
newlib-e525f6d51a38d6648ebba2a2c2b25f31d7bfe5ce.tar.bz2
2005-04-28 Shaun Jackman <sjackman@gmail.com>
* libgloss/syscalls.c (get_errno): Add an output register constraint.
-rw-r--r--libgloss/ChangeLog4
-rw-r--r--libgloss/arm/syscalls.c4
2 files changed, 7 insertions, 1 deletions
diff --git a/libgloss/ChangeLog b/libgloss/ChangeLog
index 1ccc412..11a1463 100644
--- a/libgloss/ChangeLog
+++ b/libgloss/ChangeLog
@@ -1,3 +1,7 @@
+2005-04-28 Shaun Jackman <sjackman@gmail.com>
+
+ * libgloss/syscalls.c (get_errno): Add an output register constraint.
+
2005-04-19 Eric Christopher <echristo@redhat.com>
* mips/regs.S: Sign extend constants for mips64 and unify
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
}