Skip to content

Commit

Permalink
Bugfix: Store r12 state across calls (unwind calls funcs).
Browse files Browse the repository at this point in the history
  • Loading branch information
rdtscp committed Aug 17, 2020
1 parent cb8e459 commit d989c69
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/targets/X64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,7 @@ void Writer::calleeEpilogue() {
void Writer::callerPrologue() {
comment(" ---- Caller Prologue ----");
indent();
push(r12);
push(rdi);
push(rsi);
push(rdx);
Expand All @@ -340,6 +341,7 @@ void Writer::callerEpilogue() {
pop(rdx);
pop(rsi);
pop(rdi);
pop(r12);
unindent();
comment(" -------------------------");
}
Expand Down

0 comments on commit d989c69

Please sign in to comment.