Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKazu Hirata <kazu@codesourcery.com>2006-12-26 02:05:24 +0300
committerKazu Hirata <kazu@codesourcery.com>2006-12-26 02:05:24 +0300
commit3e0c6ff3a7e1e44cdf0cfa60f627a5a73de5b345 (patch)
tree5b06174b863dbcb3f902e96cac2015209bbf3183 /libgloss
parent7f0213da6b0da60c406dfaaa1840741c3feaddb4 (diff)
* arm/licfunc.c (do_AngelSWI): Remove.
* arm/syscalls.c (do_AngelSWI): Remove. * arm/swi.h (do_AngelSWI): New.
Diffstat (limited to 'libgloss')
-rw-r--r--libgloss/ChangeLog4
-rw-r--r--libgloss/arm/libcfunc.c14
-rw-r--r--libgloss/arm/swi.h21
-rw-r--r--libgloss/arm/syscalls.c21
4 files changed, 25 insertions, 35 deletions
diff --git a/libgloss/ChangeLog b/libgloss/ChangeLog
index 272fdcb14..c74790ee7 100644
--- a/libgloss/ChangeLog
+++ b/libgloss/ChangeLog
@@ -3,6 +3,10 @@
* arm/syscalls.c (_unlink, _system, _rename): Cast arguments
to do_AngelSWI to int.
+ * arm/licfunc.c (do_AngelSWI): Remove.
+ * arm/syscalls.c (do_AngelSWI): Remove.
+ * arm/swi.h (do_AngelSWI): New.
+
2006-12-18 Kazu Hirata <kazu@codesourcery.com>
Merge from newlib-csl-20060320-branch:
diff --git a/libgloss/arm/libcfunc.c b/libgloss/arm/libcfunc.c
index 335b175d2..c8cedade5 100644
--- a/libgloss/arm/libcfunc.c
+++ b/libgloss/arm/libcfunc.c
@@ -10,20 +10,6 @@
#include <errno.h>
#include <unistd.h>
-#ifdef ARM_RDI_MONITOR
-static inline int
-do_AngelSWI (int reason, void * arg)
-{
- int value;
- asm volatile ("mov r0, %1; mov r1, %2; " AngelSWIInsn " %a3; mov %0, r0"
- : "=r" (value) /* Outputs */
- : "r" (reason), "r" (arg), "i" (AngelSWI) /* Inputs */
- : "r0", "r1", "lr"
- /* Clobbers r0 and r1, and lr if in supervisor mode */);
- return value;
-}
-#endif /* ARM_RDI_MONITOR */
-
unsigned __attribute__((weak))
alarm (unsigned seconds)
{
diff --git a/libgloss/arm/swi.h b/libgloss/arm/swi.h
index f5c910313..7638dbe4e 100644
--- a/libgloss/arm/swi.h
+++ b/libgloss/arm/swi.h
@@ -66,3 +66,24 @@
#define AngelSWI_Reason_ReportException 0x18
#define ADP_Stopped_ApplicationExit ((2 << 16) + 38)
#define ADP_Stopped_RunTimeError ((2 << 16) + 35)
+
+#if defined(ARM_RDI_MONITOR) && !defined(__ASSEMBLER__)
+
+static inline int
+do_AngelSWI (int reason, void * arg)
+{
+ int value;
+ asm volatile ("mov r0, %1; mov r1, %2; " AngelSWIInsn " %a3; mov %0, r0"
+ : "=r" (value) /* Outputs */
+ : "r" (reason), "r" (arg), "i" (AngelSWI) /* Inputs */
+ : "r0", "r1", "r2", "r3", "ip", "lr", "memory", "cc"
+ /* Clobbers r0 and r1, and lr if in supervisor mode */);
+ /* Accordingly to page 13-77 of ARM DUI 0040D other registers
+ can also be clobbered. Some memory positions may also be
+ changed by a system call, so they should not be kept in
+ registers. Note: we are assuming the manual is right and
+ Angel is respecting the APCS. */
+ return value;
+}
+
+#endif
diff --git a/libgloss/arm/syscalls.c b/libgloss/arm/syscalls.c
index 7d871f9ba..913dd3d88 100644
--- a/libgloss/arm/syscalls.c
+++ b/libgloss/arm/syscalls.c
@@ -49,7 +49,6 @@ static int wrap _PARAMS ((int));
static int error _PARAMS ((int));
static int get_errno _PARAMS ((void));
static int remap_handle _PARAMS ((int));
-static int do_AngelSWI _PARAMS ((int, void *));
static int findslot _PARAMS ((int));
/* Register name faking - works in collusion with the linker. */
@@ -95,26 +94,6 @@ findslot (int fh)
return i;
}
-#ifdef ARM_RDI_MONITOR
-
-static inline int
-do_AngelSWI (int reason, void * arg)
-{
- int value;
- asm volatile ("mov r0, %1; mov r1, %2; " AngelSWIInsn " %a3; mov %0, r0"
- : "=r" (value) /* Outputs */
- : "r" (reason), "r" (arg), "i" (AngelSWI) /* Inputs */
- : "r0", "r1", "r2", "r3", "ip", "lr", "memory", "cc"
- /* Clobbers r0 and r1, and lr if in supervisor mode */);
- /* Accordingly to page 13-77 of ARM DUI 0040D other registers
- can also be clobbered. Some memory positions may also be
- changed by a system call, so they should not be kept in
- registers. Note: we are assuming the manual is right and
- Angel is respecting the APCS. */
- return value;
-}
-#endif /* ARM_RDI_MONITOR */
-
/* Function to convert std(in|out|err) handles to internal versions. */
static int
remap_handle (int fh)