diff --git a/src/compile-x86.S b/src/compile-x86.S index de717dac0c..e680190bbb 100644 --- a/src/compile-x86.S +++ b/src/compile-x86.S @@ -107,9 +107,9 @@ GLOBAL(vmJumpAndInvoke): // %rdx: address // %r8 : base // %r9 : (unused) - // 8(%rsp): argumentFootprint - // 16(%rsp): arguments - // 24(%rsp): frameSize + // 40(%rsp): argumentFootprint + // 48(%rsp): arguments + // 56(%rsp): frameSize movq %r8,%rbp @@ -118,20 +118,20 @@ GLOBAL(vmJumpAndInvoke): movq %rbp,%r9 // allocate new frame, adding room for callee-saved registers - movl 24(%rsp),%eax + movl 56(%rsp),%eax subq %rax,%r9 subq $CALLEE_SAVED_REGISTER_FOOTPRINT,%r9 movq %rcx,%rbx // set return address - movq GLOBAL(vmInvoke_returnAddress)@GOTPCREL(%rip),%r10 + leaq GLOBAL(vmInvoke_returnAddress)(%rip),%r10 movq %r10,(%r9) // copy arguments into place movq $0,%r11 - movq 16(%rsp),%r8 - movq 8(%rsp),%rax + movl 48(%rsp),%r8d + movl 40(%rsp),%eax jmp LOCAL(vmJumpAndInvoke_argumentTest) LOCAL(vmJumpAndInvoke_argumentLoop): diff --git a/src/continuations-x86.S b/src/continuations-x86.S index 60d3b84e5f..2151659ddf 100644 --- a/src/continuations-x86.S +++ b/src/continuations-x86.S @@ -52,7 +52,11 @@ LOCAL(vmInvoke_continuationTest): // set the return address to vmInvoke_returnAddress movq CONTINUATION_RETURN_ADDRESS_OFFSET(%rcx),%rdi +#if defined __MINGW32__ || defined __CYGWIN32__ + leaq GLOBAL(vmInvoke_returnAddress)(%rip),%r10 +#else movq GLOBAL(vmInvoke_returnAddress)@GOTPCREL(%rip),%r10 +#endif movq %r10,(%rsp,%rdi,1) // save the current base pointer in the frame and update it diff --git a/src/x86.S b/src/x86.S index a5704c927d..ebee7a4474 100644 --- a/src/x86.S +++ b/src/x86.S @@ -167,8 +167,8 @@ LOCAL(exit): .globl GLOBAL(vmJump) GLOBAL(vmJump): movq %rdx,%rbp - movq 8(%rsp),%rax - movq 16(%rsp),%rdx + movq 40(%rsp),%rax + movq 48(%rsp),%rdx movq %r8,%rsp movq %r9,%rbx jmp *%rcx