summaryrefslogtreecommitdiffstats
path: root/libc/sysdeps/linux/cris/sysdep.S
diff options
context:
space:
mode:
authorPeter Kjellerstedt <peter.kjellerstedt@axis.com>2006-02-23 17:21:39 +0000
committerPeter Kjellerstedt <peter.kjellerstedt@axis.com>2006-02-23 17:21:39 +0000
commit1583fb7f92973cdbba391bd32a1b42cbdb5839b8 (patch)
tree1d0cdadd951d29a0cdec8a0116bc6576ff8590cc /libc/sysdeps/linux/cris/sysdep.S
parentd340072c9a51379eb7e754b50173269974c9bc5c (diff)
downloaduClibc-alpine-1583fb7f92973cdbba391bd32a1b42cbdb5839b8.tar.bz2
uClibc-alpine-1583fb7f92973cdbba391bd32a1b42cbdb5839b8.tar.xz
Added support for the new CRISv32 architecture.
Diffstat (limited to 'libc/sysdeps/linux/cris/sysdep.S')
-rw-r--r--libc/sysdeps/linux/cris/sysdep.S31
1 files changed, 21 insertions, 10 deletions
diff --git a/libc/sysdeps/linux/cris/sysdep.S b/libc/sysdeps/linux/cris/sysdep.S
index 30d77df15..4e558153b 100644
--- a/libc/sysdeps/linux/cris/sysdep.S
+++ b/libc/sysdeps/linux/cris/sysdep.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001 Free Software Foundation, Inc.
+/* Copyright (C) 2001, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -25,11 +25,9 @@
.type C_SYMBOL_NAME(errno),@object
.lcomm C_SYMBOL_NAME(errno),4
+ .weak errno
errno = _errno
- /* weak_alias (errno, _errno) */
-
-
/* The syscall stubs jump here when they detect an error, bot for PIC and
non-PIC. */
@@ -39,25 +37,38 @@ ENTRY (__syscall_error)
neg.d r10,r10
#ifdef __UCLIBC_HAS_THREADS__
- push r10
- push srp
+ subq 4,sp
+ move.d r10,[sp]
+ subq 4,sp
+ move srp,[sp]
/* Note that __syscall_error is only visible within this library,
and no-one passes it on as a pointer, so can assume that R0 (GOT
pointer) is correctly set up. */
- PLTCALL (__errno_location)
+ PLTCALL (HIDDEN_JUMPTARGET(__errno_location))
- pop srp
- pop r11
+ move [sp+],srp
+ move.d [sp+],r11
move.d r11,[r10]
#else /* not __UCLIBC_HAS_THREADS__ */
+#ifdef __arch_v32
+# ifdef __PIC__
+ addo.d C_SYMBOL_NAME(errno:GOT),r0,acr
+ move.d [acr],r9
+ move.d r10,[r9]
+# else /* not __PIC__ */
+ lapc C_SYMBOL_NAME(errno),acr
+ move.d r10,[r9]
+# endif /* not __PIC__ */
+#else /* not __arch_v32 */
# ifdef __PIC__
move.d [r0+C_SYMBOL_NAME(errno:GOT)],r9
move.d r10,[r9]
# else
move.d r10,[C_SYMBOL_NAME(errno)]
# endif
+#endif /* not __arch_v32 */
#endif /* __UCLIBC_HAS_THREADS__ */
#ifdef __PIC__
@@ -69,7 +80,7 @@ ENTRY (__syscall_error)
moveq -1,r10
Ret
- pop r0
+ move.d [sp+],r0
#else
Ret
moveq -1,r10