summaryrefslogtreecommitdiffstats
path: root/usr/klibc/arch/sparc/syscall.S
diff options
context:
space:
mode:
Diffstat (limited to 'usr/klibc/arch/sparc/syscall.S')
-rw-r--r--usr/klibc/arch/sparc/syscall.S21
1 files changed, 21 insertions, 0 deletions
diff --git a/usr/klibc/arch/sparc/syscall.S b/usr/klibc/arch/sparc/syscall.S
new file mode 100644
index 0000000..52a8583
--- /dev/null
+++ b/usr/klibc/arch/sparc/syscall.S
@@ -0,0 +1,21 @@
+/*
+ * arch/sparc/syscall.S
+ *
+ * Common system-call stub; %g1 already set to syscall number
+ */
+
+#include <machine/asm.h>
+
+ .globl __syscall_common
+ .type __syscall_common,#function
+ .align 4
+__syscall_common:
+ t 0x10
+ bcc 1f
+ PIC_PROLOGUE(%g1,%g4)
+ SET(errno,%g1,%g4)
+ st %o0,[%g4]
+ mov -1, %o0
+1:
+ retl
+ nop