Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

Commit

Permalink
fix Issue 12800 - Fibers are broken on Win64
Browse files Browse the repository at this point in the history
- save non-volatile registers RSI and RDI
  • Loading branch information
MartinNowak committed Nov 10, 2014
1 parent b37f86a commit fc887f3
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/core/thread.d
Original file line number Diff line number Diff line change
Expand Up @@ -3507,7 +3507,9 @@ private
push R13;
push R14;
push R15;
// Five registers = 40 bytes; stack is now aligned to 16 bytes
push RDI;
push RSI;
// 7 registers = 56 bytes; stack is now aligned to 16 bytes
sub RSP, 160;
movdqa [RSP + 144], XMM6;
movdqa [RSP + 128], XMM7;
Expand Down Expand Up @@ -3546,6 +3548,8 @@ private
movdqa XMM7, [RSP + 128];
movdqa XMM6, [RSP + 144];
add RSP, 160;
pop RSI;
pop RDI;
pop R15;
pop R14;
pop R13;
Expand Down Expand Up @@ -4494,6 +4498,8 @@ private:
push( 0x00000000_00000000 ); // R13
push( 0x00000000_00000000 ); // R14
push( 0x00000000_00000000 ); // R15
push( 0x00000000_00000000 ); // RDI
push( 0x00000000_00000000 ); // RSI
push( 0x00000000_00000000 ); // XMM6 (high)
push( 0x00000000_00000000 ); // XMM6 (low)
push( 0x00000000_00000000 ); // XMM7 (high)
Expand Down

0 comments on commit fc887f3

Please sign in to comment.