diff options
author | Anton Samokhvalov <pg83@yandex.ru> | 2022-02-10 16:45:15 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:45:15 +0300 |
commit | 72cb13b4aff9bc9cf22e49251bc8fd143f82538f (patch) | |
tree | da2c34829458c7d4e74bdfbdf85dff449e9e7fb8 /util/system/context_x86_64.asm | |
parent | 778e51ba091dc39e7b7fcab2b9cf4dbedfb6f2b5 (diff) | |
download | ydb-72cb13b4aff9bc9cf22e49251bc8fd143f82538f.tar.gz |
Restoring authorship annotation for Anton Samokhvalov <pg83@yandex.ru>. Commit 1 of 2.
Diffstat (limited to 'util/system/context_x86_64.asm')
-rw-r--r-- | util/system/context_x86_64.asm | 64 |
1 files changed, 32 insertions, 32 deletions
diff --git a/util/system/context_x86_64.asm b/util/system/context_x86_64.asm index 8bcc01e4fc..10ed1f6db4 100644 --- a/util/system/context_x86_64.asm +++ b/util/system/context_x86_64.asm @@ -1,5 +1,5 @@ - [bits 64] - + [bits 64] + %define MJB_RBX 0 %define MJB_RBP 1 %define MJB_R12 2 @@ -8,33 +8,33 @@ %define MJB_R15 5 %define MJB_RSP 6 %define MJB_PC 7 - %define MJB_SIZE (8*8) - -EXPORT __mylongjmp - mov rbx, [rdi + MJB_RBX * 8] - mov rbp, [rdi + MJB_RBP * 8] - mov r12, [rdi + MJB_R12 * 8] - mov r13, [rdi + MJB_R13 * 8] - mov r14, [rdi + MJB_R14 * 8] - mov r15, [rdi + MJB_R15 * 8] - test esi, esi - mov eax, 1 - cmove esi, eax - mov eax, esi - mov rdx, [rdi + MJB_PC * 8] - mov rsp, [rdi + MJB_RSP * 8] - jmp rdx - -EXPORT __mysetjmp - mov [rdi + MJB_RBX * 8], rbx - mov [rdi + MJB_RBP * 8], rbp - mov [rdi + MJB_R12 * 8], r12 - mov [rdi + MJB_R13 * 8], r13 - mov [rdi + MJB_R14 * 8], r14 - mov [rdi + MJB_R15 * 8], r15 - lea rdx, [rsp + 8] - mov [rdi + MJB_RSP * 8], rdx - mov rax, [rsp] - mov [rdi + MJB_PC * 8], rax - mov eax, 0 - ret + %define MJB_SIZE (8*8) + +EXPORT __mylongjmp + mov rbx, [rdi + MJB_RBX * 8] + mov rbp, [rdi + MJB_RBP * 8] + mov r12, [rdi + MJB_R12 * 8] + mov r13, [rdi + MJB_R13 * 8] + mov r14, [rdi + MJB_R14 * 8] + mov r15, [rdi + MJB_R15 * 8] + test esi, esi + mov eax, 1 + cmove esi, eax + mov eax, esi + mov rdx, [rdi + MJB_PC * 8] + mov rsp, [rdi + MJB_RSP * 8] + jmp rdx + +EXPORT __mysetjmp + mov [rdi + MJB_RBX * 8], rbx + mov [rdi + MJB_RBP * 8], rbp + mov [rdi + MJB_R12 * 8], r12 + mov [rdi + MJB_R13 * 8], r13 + mov [rdi + MJB_R14 * 8], r14 + mov [rdi + MJB_R15 * 8], r15 + lea rdx, [rsp + 8] + mov [rdi + MJB_RSP * 8], rdx + mov rax, [rsp] + mov [rdi + MJB_PC * 8], rax + mov eax, 0 + ret |