diff options
author | Sergiy Kuryata <sergeyk@microsoft.com> | 2017-04-26 06:40:10 +0300 |
---|---|---|
committer | Jan Kotas <jkotas@microsoft.com> | 2017-04-26 06:40:10 +0300 |
commit | e84f0fec21b8717c5b66fac5ce3d8635cb2e6a54 (patch) | |
tree | 8ca786c60f6931f25a21b8828a357a6b5b61d985 /src/Native/Runtime/unix | |
parent | 72dadbec5d736598310460a8ed1345366945fec9 (diff) |
Enable precise GC on Unix (#3310)
Diffstat (limited to 'src/Native/Runtime/unix')
-rw-r--r-- | src/Native/Runtime/unix/unixasmmacrosamd64.inc | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/Native/Runtime/unix/unixasmmacrosamd64.inc b/src/Native/Runtime/unix/unixasmmacrosamd64.inc index 5e85f7053..ed6f1db30 100644 --- a/src/Native/Runtime/unix/unixasmmacrosamd64.inc +++ b/src/Native/Runtime/unix/unixasmmacrosamd64.inc @@ -289,9 +289,7 @@ C_FUNC(\Name): DEFAULT_FRAME_SAVE_FLAGS = PTFF_SAVE_ALL_PRESERVED + PTFF_SAVE_RSP .macro PUSH_COOP_PINVOKE_FRAME trashReg - push_nonvol_reg rbp - mov rbp, rsp - lea \trashReg, [rsp + 10h] + lea \trashReg, [rsp + 8h] push_register \trashReg // save caller's RSP push_nonvol_reg r15 // save preserved registers push_nonvol_reg r14 // .. @@ -300,15 +298,20 @@ DEFAULT_FRAME_SAVE_FLAGS = PTFF_SAVE_ALL_PRESERVED + PTFF_SAVE_RSP push_nonvol_reg rbx // .. push_imm DEFAULT_FRAME_SAVE_FLAGS // save the register bitmask push_register \trashReg // Thread * (unused by stackwalker) - push_register rbp // save caller's RBP - mov \trashReg, [rsp + 10*8] // Find the return address + push_nonvol_reg rbp // save caller's RBP + mov \trashReg, [rsp + 9*8] // Find the return address push_register \trashReg // save m_RIP lea \trashReg, [rsp] // trashReg == address of frame + + // stack alignment + alloc_stack 8 .endm .macro POP_COOP_PINVOKE_FRAME - pop_register r10 // discard RIP - pop_register r10 // discarp RBP + // Adjust for stack alignment and discard RIP + free_stack 16 + + pop_nonvol_reg rbp // restore RBP pop_register r10 // discard thread pop_register r10 // discard bitmask pop_nonvol_reg rbx @@ -317,5 +320,4 @@ DEFAULT_FRAME_SAVE_FLAGS = PTFF_SAVE_ALL_PRESERVED + PTFF_SAVE_RSP pop_nonvol_reg r14 pop_nonvol_reg r15 pop_register r10 // discard caller RSP - pop_nonvol_reg rbp .endm |