[DynInst_API:] [dyninst/dyninst] e51ca4: Refactor is_call


Date: Wed, 20 Dec 2023 07:17:09 -0800
From: Tim Haines <noreply@xxxxxxxxxx>
Subject: [DynInst_API:] [dyninst/dyninst] e51ca4: Refactor is_call
  Branch: refs/heads/thaines/capstone_integration
  Home:   https://github.com/dyninst/dyninst
  Commit: e51ca4c46b76b1392a1a770cafe392b88b6ae58c
      https://github.com/dyninst/dyninst/commit/e51ca4c46b76b1392a1a770cafe392b88b6ae58c
  Author: Tim Haines <thaines.astro@xxxxxxxxx>
  Date:   2023-12-20 (Wed, 20 Dec 2023)

  Changed paths:
    M instructionAPI/src/x86/decoder.C

  Log Message:
  -----------
  Refactor is_call

The original code did the nested check, but didn't need to.

  if(cat == c_BranchInsn || cat == c_CallInsn) {
    isCFT = true;
    if(cat == c_CallInsn) {
      isCall = true;
    }
  }

is equivalent to

  if(cat == c_CallInsn) {
    isCall = true;
  }

  if(cat == c_BranchInsn || isCall) {
    isCFT = true;
  }


  Commit: 7d41040844df8d7a205157a9c4cfd97db5277ed3
      https://github.com/dyninst/dyninst/commit/7d41040844df8d7a205157a9c4cfd97db5277ed3
  Author: Tim Haines <thaines.astro@xxxxxxxxx>
  Date:   2023-12-20 (Wed, 20 Dec 2023)

  Changed paths:
    M instructionAPI/src/x86/decoder.C

  Log Message:
  -----------
  Fix comment in expand_eflags


Compare: https://github.com/dyninst/dyninst/compare/7d58083f2992...7d41040844df
[← Prev in Thread] Current Thread [Next in Thread→]
  • [DynInst_API:] [dyninst/dyninst] e51ca4: Refactor is_call, Tim Haines <=