Skip to content

Commit

Permalink
Fixes loading pre-instrumentation register values on aarch64
Browse files Browse the repository at this point in the history
  • Loading branch information
mxz297 authored and hainest committed Oct 16, 2019
1 parent b7c9eee commit 1090859
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions dyninstAPI/src/emit-aarch64.C
Original file line number Diff line number Diff line change
Expand Up @@ -274,17 +274,17 @@ void EmitterAARCH64::emitLoadOrigRegister(Address register_num, Register destina
registerSlot *dest = (*gen.rs())[destination];
assert(dest);

if (register_num == REG_SP) {
if (src->name == "sp") {
insnCodeGen::generateAddSubImmediate(gen, insnCodeGen::Add, 0,
TRAMP_FRAME_SIZE_64, destination, REG_SP, true);
TRAMP_FRAME_SIZE_64, REG_SP, destination, true);

return;
}

if (src->spilledState == registerSlot::unspilled)
{
// not on the stack. Directly move the value
emitMoveRegToReg((Register) register_num, destination, gen);
insnCodeGen::generateMove(gen, destination, (Register) register_num, true);
return;
}

Expand Down

0 comments on commit 1090859

Please sign in to comment.