-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WINDOWS: replace setjmp/longjmp with their equivalent in Intel syntax…
… per the objdump disassembler
- Loading branch information
Showing
4 changed files
with
74 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,31 @@ | ||
#include "../../deps/openlibm/amd64/bsd_asm.h" | ||
|
||
.intel_syntax noprefix | ||
ENTRY(jl_longjmp) | ||
movq 8(%rcx),%rbx | ||
movq 16(%rcx),%rsp | ||
movq 24(%rcx),%rbp | ||
movq 32(%rcx),%rsi | ||
movq 40(%rcx),%rdi | ||
movq 48(%rcx),%r12 | ||
movq 56(%rcx),%r13 | ||
movq 64(%rcx),%r14 | ||
movq 72(%rcx),%r15 | ||
movq 80(%rcx),%r8 | ||
movaps 96(%rcx),%xmm6 | ||
movaps 112(%rcx),%xmm7 | ||
movaps 128(%rcx),%xmm8 | ||
movaps 144(%rcx),%xmm9 | ||
movaps 160(%rcx),%xmm10 | ||
movaps 176(%rcx),%xmm11 | ||
movaps 192(%rcx),%xmm12 | ||
movaps 208(%rcx),%xmm13 | ||
movaps 224(%rcx),%xmm14 | ||
movaps 240(%rcx),%xmm15 | ||
|
||
movl %edx,%eax | ||
testl %eax,%eax | ||
jnz 1f | ||
incl %eax | ||
1: movq %r8,0(%rsp) | ||
mov rbx,QWORD PTR [rcx+0x08] | ||
mov rsp,QWORD PTR [rcx+0x10] | ||
mov rbp,QWORD PTR [rcx+0x18] | ||
mov rsi,QWORD PTR [rcx+0x20] | ||
mov rdi,QWORD PTR [rcx+0x28] | ||
mov r12,QWORD PTR [rcx+0x30] | ||
mov r13,QWORD PTR [rcx+0x38] | ||
mov r14,QWORD PTR [rcx+0x40] | ||
mov r15,QWORD PTR [rcx+0x48] | ||
mov r8, QWORD PTR [rcx+0x50] | ||
movaps xmm6,XMMWORD PTR [rcx+0x60] | ||
movaps xmm7,XMMWORD PTR [rcx+0x70] | ||
movaps xmm8,XMMWORD PTR [rcx+0x80] | ||
movaps xmm9,XMMWORD PTR [rcx+0x90] | ||
movaps xmm10,XMMWORD PTR [rcx+0xa0] | ||
movaps xmm11,XMMWORD PTR [rcx+0xb0] | ||
movaps xmm12,XMMWORD PTR [rcx+0xc0] | ||
movaps xmm13,XMMWORD PTR [rcx+0xd0] | ||
movaps xmm14,XMMWORD PTR [rcx+0xe0] | ||
movaps xmm15,XMMWORD PTR [rcx+0xf0] | ||
mov eax,edx | ||
test eax,eax | ||
jne 1f | ||
inc eax | ||
1: mov QWORD PTR [rsp],r8 | ||
ret | ||
END(jl_longjmp) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,30 @@ | ||
#include "../../deps/openlibm/amd64/bsd_asm.h" | ||
|
||
.intel_syntax noprefix | ||
ENTRY(jl_setjmp) | ||
movq 0(%rsp),%rdx | ||
movq $0,0(%rcx) | ||
movq %rbx,8(%rcx) | ||
movq %rsp,16(%rcx) | ||
movq %rbp,24(%rcx) | ||
movq %rsi,32(%rcx) | ||
movq %rdi,40(%rcx) | ||
movq %r12,48(%rcx) | ||
movq %r13,56(%rcx) | ||
movq %r14,64(%rcx) | ||
movq %r15,72(%rcx) | ||
movq %rdx,80(%rcx) | ||
movq $0,88(%rcx) | ||
movaps %xmm6,96(%rcx) | ||
movaps %xmm7,112(%rcx) | ||
movaps %xmm8,128(%rcx) | ||
movaps %xmm9,144(%rcx) | ||
movaps %xmm10,160(%rcx) | ||
movaps %xmm11,176(%rcx) | ||
movaps %xmm12,192(%rcx) | ||
movaps %xmm13,208(%rcx) | ||
movaps %xmm14,224(%rcx) | ||
movaps %xmm15,240(%rcx) | ||
|
||
xorq %rax,%rax | ||
mov rdx,QWORD PTR [rsp] | ||
mov QWORD PTR [rcx],0x0 | ||
mov QWORD PTR [rcx+0x08],rbx | ||
mov QWORD PTR [rcx+0x10],rsp | ||
mov QWORD PTR [rcx+0x18],rbp | ||
mov QWORD PTR [rcx+0x20],rsi | ||
mov QWORD PTR [rcx+0x28],rdi | ||
mov QWORD PTR [rcx+0x30],r12 | ||
mov QWORD PTR [rcx+0x38],r13 | ||
mov QWORD PTR [rcx+0x40],r14 | ||
mov QWORD PTR [rcx+0x48],r15 | ||
mov QWORD PTR [rcx+0x50],rdx | ||
mov QWORD PTR [rcx+0x58],0x0 | ||
movaps XMMWORD PTR [rcx+0x60],xmm6 | ||
movaps XMMWORD PTR [rcx+0x70],xmm7 | ||
movaps XMMWORD PTR [rcx+0x80],xmm8 | ||
movaps XMMWORD PTR [rcx+0x90],xmm9 | ||
movaps XMMWORD PTR [rcx+0xa0],xmm10 | ||
movaps XMMWORD PTR [rcx+0xb0],xmm11 | ||
movaps XMMWORD PTR [rcx+0xc0],xmm12 | ||
movaps XMMWORD PTR [rcx+0xd0],xmm13 | ||
movaps XMMWORD PTR [rcx+0xe0],xmm14 | ||
movaps XMMWORD PTR [rcx+0xf0],xmm15 | ||
xor rax,rax | ||
ret | ||
END(jl_setjmp) |