2
0
mirror of https://github.com/boostorg/context.git synced 2026-01-19 04:02:17 +00:00

x64 Windows: store/load fiber local storage from correct offset

This commit is contained in:
Oliver Kowalke
2017-04-24 17:37:29 +02:00
parent 2cec475b48
commit 50ebf5bd11
4 changed files with 8 additions and 8 deletions

View File

@@ -116,7 +116,7 @@ jump_fcontext:
/* load NT_TIB */
movq %gs:(0x30), %r10
/* save fiber local storage */
movq 0x18(%r10), %rax
movq 0x20(%r10), %rax
movq %rax, 0xb0(%rsp)
/* save current deallocation stack */
movq 0x1478(%r10), %rax
@@ -165,7 +165,7 @@ jump_fcontext:
movq %gs:(0x30), %r10
/* restore fiber local storage */
movq 0xb0(%rsp), %rax
movq %rax, 0x18(%r10)
movq %rax, 0x20(%r10)
/* restore current deallocation stack */
movq 0xb8(%rsp), %rax
movq %rax, 0x1478(%r10)

View File

@@ -111,7 +111,7 @@ ENDIF
; load NT_TIB
mov r10, gs:[030h]
; save fiber local storage
mov rax, [r10+018h]
mov rax, [r10+020h]
mov [rsp+0b0h], rax
; save current deallocation stack
mov rax, [r10+01478h]
@@ -162,7 +162,7 @@ ENDIF
mov r10, gs:[030h]
; restore fiber local storage
mov rax, [rsp+0b0h]
mov [r10+018h], rax
mov [r10+020h], rax
; restore current deallocation stack
mov rax, [rsp+0b8h]
mov [r10+01478h], rax

View File

@@ -116,7 +116,7 @@ ontop_fcontext:
/* load NT_TIB */
movq %gs:(0x30), %r10
/* save fiber local storage */
movq 0x18(%r10), %rax
movq 0x20(%r10), %rax
movq %rax, 0xb0(%rsp)
/* save current deallocation stack */
movq 0x1478(%r10), %rax
@@ -165,7 +165,7 @@ ontop_fcontext:
movq %gs:(0x30), %r10
/* restore fiber local storage */
movq 0xb0(%rsp), %rax
movq %rax, 0x18(%r10)
movq %rax, 0x20(%r10)
/* restore current deallocation stack */
movq 0xb8(%rsp), %rax
movq %rax, 0x1478(%r10)

View File

@@ -111,7 +111,7 @@ ENDIF
; load NT_TIB
mov r10, gs:[030h]
; save fiber local storage
mov rax, [r10+018h]
mov rax, [r10+020h]
mov [rsp+0b0h], rax
; save current deallocation stack
mov rax, [r10+01478h]
@@ -162,7 +162,7 @@ ENDIF
mov r10, gs:[030h]
; restore fiber local storage
mov rax, [rsp+0b0h]
mov [r10+018h], rax
mov [r10+020h], rax
; restore current deallocation stack
mov rax, [rsp+0b8h]
mov [r10+01478h], rax