about summary refs log tree commit diff
path: root/src/internal/microblaze
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2012-09-29 01:05:31 -0400
committerRich Felker <dalias@aerifal.cx>2012-09-29 01:05:31 -0400
commit8c0a3d9e5c169fc9d0f246ab59362b658b029ad7 (patch)
tree6ac54202768db511e8bb959d85060adb98cbf226 /src/internal/microblaze
parente0ea44cb764fcdbe8515f22096930bede2c7896f (diff)
downloadmusl-8c0a3d9e5c169fc9d0f246ab59362b658b029ad7.tar.gz
musl-8c0a3d9e5c169fc9d0f246ab59362b658b029ad7.tar.xz
musl-8c0a3d9e5c169fc9d0f246ab59362b658b029ad7.zip
microblaze port
based on initial work by rdp, with heavy modifications. some features
including threads are untested because qemu app-level emulation seems
to be broken and I do not have a proper system image for testing.
Diffstat (limited to 'src/internal/microblaze')
-rw-r--r--src/internal/microblaze/syscall.s13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/internal/microblaze/syscall.s b/src/internal/microblaze/syscall.s
new file mode 100644
index 00000000..9bf7c0e0
--- /dev/null
+++ b/src/internal/microblaze/syscall.s
@@ -0,0 +1,13 @@
+.global __syscall
+.type   __syscall,@function
+__syscall:
+	addi    r12, r5, 0              # Save the system call number
+	add     r5, r6, r0              # Shift the arguments, arg1
+	add     r6, r7, r0              # arg2
+	add     r7, r8, r0              # arg3
+	add     r8, r9, r0              # arg4
+	add     r9, r10, r0             # arg5
+	lwi     r10, r1, 28             # Get arg6.
+	brki    r14, 0x8                # syscall
+	rtsd    r15, 8
+	nop