aboutsummaryrefslogtreecommitdiff
path: root/libgloss/arm/linux-syscalls0.S
diff options
context:
space:
mode:
Diffstat (limited to 'libgloss/arm/linux-syscalls0.S')
-rw-r--r--libgloss/arm/linux-syscalls0.S11
1 files changed, 11 insertions, 0 deletions
diff --git a/libgloss/arm/linux-syscalls0.S b/libgloss/arm/linux-syscalls0.S
index b16648f..17d246e 100644
--- a/libgloss/arm/linux-syscalls0.S
+++ b/libgloss/arm/linux-syscalls0.S
@@ -6,6 +6,8 @@
* is freely granted, provided that this notice is preserved.
*/
+ .syntax unified
+
#include "linux-syscall.h"
#if __thumb__
@@ -146,12 +148,21 @@ ALIAS(utime)
ALIAS(vfork)
ALIAS(wait4)
+#if defined (__thumb__) && !defined (__thumb2__)
+# define SOCKETCALL(name, NAME) \
+ GLOBAL(name); \
+ push { r0 - r3 }; \
+ movs r0, #SYS_ ## NAME; \
+ b _socketcall_tail; \
+ SIZE(name)
+#else
# define SOCKETCALL(name, NAME) \
GLOBAL(name); \
push { r0 - r3 }; \
mov r0, #SYS_ ## NAME; \
b _socketcall_tail; \
SIZE(name)
+#endif
FUNC(_socketcall_tail)
mov r1, sp