Skip to content

Commit

Permalink
Move is_call and is_cft to where they are used
Browse files Browse the repository at this point in the history
  • Loading branch information
hainest committed Dec 21, 2023
1 parent 4bcee51 commit 2d81c7c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions instructionAPI/src/x86/decoder.C
Expand Up @@ -222,8 +222,6 @@ namespace Dyninst { namespace InstructionAPI {

void x86_decoder::decode_mem(Instruction const* insn, cs_x86_op const& operand) {
Expression::Ptr effectiveAddr;
auto const isCFT = is_cft(insn->getCategory());
auto const isCall = is_call(insn->getCategory());

// TODO: handle segment registers
if(operand.mem.base != X86_REG_INVALID) {
Expand All @@ -250,7 +248,9 @@ namespace Dyninst { namespace InstructionAPI {
memAST = effectiveAddr;
else
memAST = makeDereferenceExpression(effectiveAddr, type);
if(isCFT) {

if(is_cft(insn->getCategory())) {
auto const isCall = is_call(insn->getCategory());
insn->addSuccessor(memAST, isCall, true, false, false);
} else {
// Capstone may report register operands as neither read nor written.
Expand Down

0 comments on commit 2d81c7c

Please sign in to comment.