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

Side by Side Diff: fusl/src/setjmp/x32/longjmp.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/setjmp/sheb-nofpu/setjmp.sub ('k') | fusl/src/setjmp/x32/setjmp.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 /* Copyright 2011-2012 Nicholas J. Kain, licensed under standard MIT license */
2 .global _longjmp
3 .global longjmp
4 .type _longjmp,@function
5 .type longjmp,@function
6 _longjmp:
7 longjmp:
8 mov %rsi,%rax /* val will be longjmp return */
9 test %rax,%rax
10 jnz 1f
11 inc %rax /* if val==0, val=1 per longjmp semantics */
12 1:
13 mov (%rdi),%rbx /* rdi is the jmp_buf, restore regs from it */
14 mov 8(%rdi),%rbp
15 mov 16(%rdi),%r12
16 mov 24(%rdi),%r13
17 mov 32(%rdi),%r14
18 mov 40(%rdi),%r15
19 mov 48(%rdi),%rdx /* this ends up being the stack pointer */
20 mov %rdx,%rsp
21 mov 56(%rdi),%rdx /* this is the instruction pointer */
22 jmp *%rdx /* goto saved address without altering rsp */
OLDNEW
« no previous file with comments | « fusl/src/setjmp/sheb-nofpu/setjmp.sub ('k') | fusl/src/setjmp/x32/setjmp.s » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698