Skip to content

Commit

Permalink
Merge boost.context 1.74.0 (Support The 32-bit Solaris C language dat…
Browse files Browse the repository at this point in the history
…a model, called ILP32)
  • Loading branch information
owent committed Dec 7, 2020
1 parent f09f1dc commit 696d836
Showing 2 changed files with 20 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/libcopp/fcontext/asm/jump_x86_64_sysv_elf_gas.S
Original file line number Diff line number Diff line change
@@ -67,10 +67,20 @@ copp_jump_fcontext:
leaq 0x40(%rsp), %rsp /* prepare stack */

/* return transfer_t from jump */
#if !defined(_ILP32)
/* RAX == fctx, RDX == data */
movq %rsi, %rdx
#else
/* RAX == data:fctx */
salq $32, %rsi
orq %rsi, %rax
#endif
/* pass transfer_t as first arg in context function */
#if !defined(_ILP32)
/* RDI == fctx, RSI == data */
#else
/* RDI == data:fctx */
#endif
movq %rax, %rdi

/* indirect jump to context */
10 changes: 10 additions & 0 deletions src/libcopp/fcontext/asm/ontop_x86_64_sysv_elf_gas.S
Original file line number Diff line number Diff line change
@@ -68,10 +68,20 @@ copp_ontop_fcontext:
leaq 0x38(%rsp), %rsp /* prepare stack */

/* return transfer_t from jump */
#if !defined(_ILP32)
/* RAX == fctx, RDX == data */
movq %rsi, %rdx
#else
/* RAX == data:fctx */
salq $32, %rsi
orq %rsi, %rax
#endif
/* pass transfer_t as first arg in context function */
#if !defined(_ILP32)
/* RDI == fctx, RSI == data */
#else
/* RDI == data:fctx */
#endif
movq %rax, %rdi

/* keep return-address on stack */

0 comments on commit 696d836

Please sign in to comment.