summaryrefslogtreecommitdiffstats
path: root/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sysdep.h
diff options
context:
space:
mode:
authoraustinf <austinf@localhost>2009-03-19 07:29:30 +0000
committeraustinf <austinf@localhost>2009-03-19 07:29:30 +0000
commit2ea44632aac286a927069a1fb1f979db23c0b3c4 (patch)
tree405585f334c03e95c106924c03ed4642f80874a0 /libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sysdep.h
parentd38a60ef0325122761dea450cc163ac036d896e7 (diff)
downloaduClibc-alpine-2ea44632aac286a927069a1fb1f979db23c0b3c4.tar.bz2
uClibc-alpine-2ea44632aac286a927069a1fb1f979db23c0b3c4.tar.xz
sparc32 nptl functional
* pulled updated asm and headers from glibc for sparc32 * probably no cancellation support yet * no shared TLS relocs yet, since ldso is hosed on sparc still note: didn't use TARGET_SUBARCH method of includes since that would cause other parts of libc to fail currently. Will need to be fixed later.
Diffstat (limited to 'libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sysdep.h')
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sysdep.h65
1 files changed, 65 insertions, 0 deletions
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sysdep.h b/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sysdep.h
new file mode 100644
index 000000000..744e587a3
--- /dev/null
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sysdep.h
@@ -0,0 +1,65 @@
+#ifndef _LINUX_SPARC_SYSDEP_H
+#define _LINUX_SPARC_SYSDEP_H 1
+
+#include <sysdeps/unix/sysdep.h>
+
+#undef ENTRY
+#undef END
+
+#ifdef __ASSEMBLER__
+
+#define LOADSYSCALL(x) mov __NR_##x, %g1
+
+#define ENTRY(name) \
+ .align 4; \
+ .global C_SYMBOL_NAME(name); \
+ .type name, @function; \
+C_LABEL(name) \
+ cfi_startproc;
+
+#define END(name) \
+ cfi_endproc; \
+ .size name, . - name
+
+#define LOC(name) .L##name
+
+ /* If the offset to __syscall_error fits into a signed 22-bit
+ * immediate branch offset, the linker will relax the call into
+ * a normal branch.
+ */
+#undef PSEUDO
+#undef PSEUDO_END
+#undef PSEUDO_NOERRNO
+#undef PSEUDO_ERRVAL
+
+#define PSEUDO(name, syscall_name, args) \
+ .text; \
+ .globl __syscall_error; \
+ENTRY(name); \
+ LOADSYSCALL(syscall_name); \
+ ta 0x10; \
+ bcc 1f; \
+ mov %o7, %g1; \
+ call __syscall_error; \
+ mov %g1, %o7; \
+1:
+
+#define PSEUDO_NOERRNO(name, syscall_name, args)\
+ .text; \
+ENTRY(name); \
+ LOADSYSCALL(syscall_name); \
+ ta 0x10;
+
+#define PSEUDO_ERRVAL(name, syscall_name, args) \
+ .text; \
+ENTRY(name); \
+ LOADSYSCALL(syscall_name); \
+ ta 0x10;
+
+#define PSEUDO_END(name) \
+ END(name)
+
+
+#endif
+
+#endif