about summary refs log tree commit diff
path: root/src/unistd
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2016-04-18 05:19:13 +0000
committerRich Felker <dalias@aerifal.cx>2016-04-18 05:19:13 +0000
commit5972c4a4113e2a4de5edf519faf15296ae1eb3ed (patch)
tree6e808f23bb96a9b8a82eb505e2a719f4f42a758d /src/unistd
parent6d99ad91e869aab35a4d76d34c3c9eaf29482bad (diff)
downloadmusl-5972c4a4113e2a4de5edf519faf15296ae1eb3ed.tar.gz
musl-5972c4a4113e2a4de5edf519faf15296ae1eb3ed.tar.xz
musl-5972c4a4113e2a4de5edf519faf15296ae1eb3ed.zip
add mips n32 port (ILP32 ABI for mips64)
based on patch submitted by Jaydeep Patil, with minor changes.
Diffstat (limited to 'src/unistd')
-rw-r--r--src/unistd/mipsn32/pipe.s19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/unistd/mipsn32/pipe.s b/src/unistd/mipsn32/pipe.s
new file mode 100644
index 00000000..80f882e2
--- /dev/null
+++ b/src/unistd/mipsn32/pipe.s
@@ -0,0 +1,19 @@
+.set	noreorder
+.global	pipe
+.type	pipe,@function
+pipe:
+	lui	$3, %hi(%neg(%gp_rel(pipe)))
+	addiu	$3, $3, %lo(%neg(%gp_rel(pipe)))
+	addu	$3, $3, $25
+	li	$2, 6021
+	syscall
+	beq	$7, $0, 1f
+	nop
+	lw	$25, %got_disp(__syscall_ret)($3)
+	jr	$25
+	subu	$4, $0, $2
+1:	sw	$2, 0($4)
+	sw	$3, 4($4)
+	move	$2, $0
+	jr	$ra
+	nop