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

Commit

Permalink
replace return with pop and unconditional jump
Browse files Browse the repository at this point in the history
- CPU return stack is incorrect after a stack switch
  and thus branch prediction always fails for return
  instructions
  • Loading branch information
MartinNowak committed Feb 17, 2013
1 parent c74fd3c commit b57f924
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core/thread.d
Expand Up @@ -3279,7 +3279,8 @@ private
pop EBP;

// 'return' to complete switch
ret;
pop ECX;
jmp ECX;
}
}
else version( AsmX86_64_Windows )
Expand Down

0 comments on commit b57f924

Please sign in to comment.