Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(264)

Unified Diff: fusl/src/unistd/sh/pipe.s

Issue 1573973002: Add a "fork" of musl as //fusl. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « fusl/src/unistd/setxid.c ('k') | fusl/src/unistd/sleep.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fusl/src/unistd/sh/pipe.s
diff --git a/fusl/src/unistd/sh/pipe.s b/fusl/src/unistd/sh/pipe.s
new file mode 100644
index 0000000000000000000000000000000000000000..46c4908e7b463bfe5c9888033dc2db8172835d0b
--- /dev/null
+++ b/fusl/src/unistd/sh/pipe.s
@@ -0,0 +1,27 @@
+.global pipe
+.type pipe, @function
+pipe:
+ mov #42, r3
+ trapa #31
+
+ ! work around hardware bug
+ or r0, r0
+ or r0, r0
+ or r0, r0
+ or r0, r0
+ or r0, r0
+
+ cmp/pz r0
+ bt 1f
+
+ mov.l L1, r1
+ braf r1
+ mov r0, r4
+
+1: mov.l r0, @(0,r4)
+ mov.l r1, @(4,r4)
+ rts
+ mov #0, r0
+
+.align 2
+L1: .long __syscall_ret@PLT-(1b-.)
« no previous file with comments | « fusl/src/unistd/setxid.c ('k') | fusl/src/unistd/sleep.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698