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

Side by Side Diff: fusl/src/thread/sh/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 unified diff | Download patch
« no previous file with comments | « fusl/src/thread/sh/__unmapself.s ('k') | fusl/src/thread/sh/syscall_cp.s » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 .text
2 .global __clone
3 .type __clone, @function
4 __clone:
5 ! incoming: fn stack flags arg ptid tls ctid
6 ! r4 r5 r6 r7 @r15 @(4,r15) @(8,r15)
7
8 mov #-16, r0
9 and r0, r5
10
11 mov r4, r1 ! r1 = fn
12 mov r7, r2 ! r2 = arg
13
14 mov #120, r3 ! r3 = __NR_clone
15 mov r6, r4 ! r4 = flags
16 !mov r5, r5 ! r5 = stack
17 mov.l @r15, r6 ! r6 = ptid
18 mov.l @(8,r15), r7 ! r7 = ctid
19 mov.l @(4,r15), r0 ! r0 = tls
20 trapa #31
21
22 or r0, r0
23 or r0, r0
24 or r0, r0
25 or r0, r0
26 or r0, r0
27
28 cmp/eq #0, r0
29 bt 1f
30
31 ! we are the parent, return
32 rts
33 nop
34
35 1: ! we are the child, call fn(arg)
36 mov.l 1f, r0
37 mov r1, r5
38 bsrf r0
39 mov r2, r4
40
41 2: mov #1, r3 ! __NR_exit
42 mov r0, r4
43 trapa #31
44
45 or r0, r0
46 or r0, r0
47 or r0, r0
48 or r0, r0
49 or r0, r0
50
51 .align 2
52 .hidden __shcall
53 1: .long __shcall@PCREL+(.-2b)
OLDNEW
« no previous file with comments | « fusl/src/thread/sh/__unmapself.s ('k') | fusl/src/thread/sh/syscall_cp.s » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698