Skip to content

Commit

Permalink
Handle returns with arguments.
Browse files Browse the repository at this point in the history
  • Loading branch information
morehouse committed Oct 27, 2016
1 parent 3868dcc commit a1e33a0
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions dataflowAPI/src/stackanalysis.C
Expand Up @@ -1277,9 +1277,10 @@ void StackAnalysis::handleReturn(Instruction::Ptr insn,
if (operands.size() < 2) {
delta = word_size;
} else {
fprintf(stderr, "Unhandled RET instruction: %s\n",
insn->format().c_str());
assert(false);
assert(operands.size() == 2);
Result imm = operands[1].getValue()->eval();
assert(imm.defined);
delta = word_size + imm.convert<long>();
}
/* else if (operands.size() == 1) {
// Ret immediate
Expand Down

0 comments on commit a1e33a0

Please sign in to comment.