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

Unified Diff: fusl/src/thread/arm/clone.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/thread/arm/__unmapself.s ('k') | fusl/src/thread/arm/syscall_cp.s » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fusl/src/thread/arm/clone.s
diff --git a/fusl/src/thread/arm/clone.s b/fusl/src/thread/arm/clone.s
new file mode 100644
index 0000000000000000000000000000000000000000..fe2e0e60ec4c9e5963fe55d5a940f4028f6c39da
--- /dev/null
+++ b/fusl/src/thread/arm/clone.s
@@ -0,0 +1,31 @@
+.syntax unified
+.text
+.global __clone
+.type __clone,%function
+__clone:
+ stmfd sp!,{r4,r5,r6,r7}
+ mov r7,#120
+ mov r6,r3
+ mov r5,r0
+ mov r0,r2
+ and r1,r1,#-16
+ ldr r2,[sp,#16]
+ ldr r3,[sp,#20]
+ ldr r4,[sp,#24]
+ svc 0
+ tst r0,r0
+ beq 1f
+ ldmfd sp!,{r4,r5,r6,r7}
+ bx lr
+
+1: mov r0,r6
+ tst r5,#1
+ bne 1f
+ mov lr,pc
+ mov pc,r5
+2: mov r7,#1
+ svc 0
+
+1: mov lr,pc
+ bx r5
+ b 2b
« no previous file with comments | « fusl/src/thread/arm/__unmapself.s ('k') | fusl/src/thread/arm/syscall_cp.s » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698