mirror of
https://github.com/fluencelabs/wasmer
synced 2024-12-13 22:25:40 +00:00
register_preservation_trampoline
This commit is contained in:
parent
7028df23ef
commit
0a54213d4f
@ -67,3 +67,37 @@ popq %r13
|
||||
popq %r14
|
||||
popq %r15
|
||||
retq
|
||||
|
||||
# For switching into a backend without information about where registers are preserved.
|
||||
.globl register_preservation_trampoline
|
||||
register_preservation_trampoline:
|
||||
subq $8, %rsp
|
||||
pushq %rax
|
||||
pushq %rcx
|
||||
pushq %rdx
|
||||
pushq %rdi
|
||||
pushq %rsi
|
||||
pushq %r8
|
||||
pushq %r9
|
||||
pushq %r10
|
||||
|
||||
callq get_boundary_register_preservation
|
||||
|
||||
# Keep this consistent with BoundaryRegisterPreservation
|
||||
movq %r15, 0(%rax)
|
||||
movq %r14, 8(%rax)
|
||||
movq %r13, 16(%rax)
|
||||
movq %r12, 24(%rax)
|
||||
movq %rbx, 32(%rax)
|
||||
|
||||
popq %r10
|
||||
popq %r9
|
||||
popq %r8
|
||||
popq %rsi
|
||||
popq %rdi
|
||||
popq %rdx
|
||||
popq %rcx
|
||||
popq %rax
|
||||
addq $8, %rsp
|
||||
|
||||
jmpq *%rax
|
||||
|
@ -67,3 +67,37 @@ popq %r13
|
||||
popq %r14
|
||||
popq %r15
|
||||
retq
|
||||
|
||||
# For switching into a backend without information about where registers are preserved.
|
||||
.globl _register_preservation_trampoline
|
||||
_register_preservation_trampoline:
|
||||
subq $8, %rsp
|
||||
pushq %rax
|
||||
pushq %rcx
|
||||
pushq %rdx
|
||||
pushq %rdi
|
||||
pushq %rsi
|
||||
pushq %r8
|
||||
pushq %r9
|
||||
pushq %r10
|
||||
|
||||
callq _get_boundary_register_preservation
|
||||
|
||||
# Keep this consistent with BoundaryRegisterPreservation
|
||||
movq %r15, 0(%rax)
|
||||
movq %r14, 8(%rax)
|
||||
movq %r13, 16(%rax)
|
||||
movq %r12, 24(%rax)
|
||||
movq %rbx, 32(%rax)
|
||||
|
||||
popq %r10
|
||||
popq %r9
|
||||
popq %r8
|
||||
popq %rsi
|
||||
popq %rdi
|
||||
popq %rdx
|
||||
popq %rcx
|
||||
popq %rax
|
||||
addq $8, %rsp
|
||||
|
||||
jmpq *%rax
|
||||
|
Loading…
Reference in New Issue
Block a user