OSDN Git Service

2005-04-28 Shaun Jackman <sjackman@gmail.com>
authorjjohnstn <jjohnstn>
Thu, 28 Apr 2005 18:40:39 +0000 (18:40 +0000)
committerjjohnstn <jjohnstn>
Thu, 28 Apr 2005 18:40:39 +0000 (18:40 +0000)
        * libgloss/syscalls.c (get_errno): Add an output register constraint.

libgloss/ChangeLog
libgloss/arm/syscalls.c

index 1ccc412..11a1463 100644 (file)
@@ -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
index e890228..a215d7a 100644 (file)
@@ -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
 }