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

Unified Diff: fusl/src/thread/x32/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/x32/__unmapself.s ('k') | fusl/src/thread/x32/syscall_cp.s » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fusl/src/thread/x32/clone.s
diff --git a/fusl/src/thread/x32/clone.s b/fusl/src/thread/x32/clone.s
new file mode 100644
index 0000000000000000000000000000000000000000..eed461510baa9b1499996ab3c773268261c4ac07
--- /dev/null
+++ b/fusl/src/thread/x32/clone.s
@@ -0,0 +1,25 @@
+.text
+.global __clone
+.type __clone,@function
+__clone:
+ movl $0x40000038,%eax /* SYS_clone */
+ mov %rdi,%r11
+ mov %rdx,%rdi
+ mov %r8,%rdx
+ mov %r9,%r8
+ mov 8(%rsp),%r10
+ mov %r11,%r9
+ and $-16,%rsi
+ sub $8,%rsi
+ mov %rcx,(%rsi)
+ syscall
+ test %eax,%eax
+ jnz 1f
+ xor %ebp,%ebp
+ pop %rdi
+ call *%r9
+ mov %eax,%edi
+ movl $0x4000003c,%eax /* SYS_exit */
+ syscall
+ hlt
+1: ret
« no previous file with comments | « fusl/src/thread/x32/__unmapself.s ('k') | fusl/src/thread/x32/syscall_cp.s » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698