Skip to content

Commit

Permalink
Make jz an alias of je
Browse files Browse the repository at this point in the history
  • Loading branch information
hainest committed Nov 24, 2023
1 parent b7ae83f commit 0ae1bdd
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion common/h/mnemonics/x86_entryIDs.h
Expand Up @@ -245,6 +245,7 @@ e_jnb = e_jae,
e_jb,
e_jbe,
e_je,
e_jz = e_je,
e_jg,
e_jnle = e_jg,
e_jge,
Expand All @@ -261,7 +262,6 @@ e_jo,
e_jp,
e_jrcxz,
e_js,
e_jz,
e_kaddb,
e_kaddd,
e_kaddq,
Expand Down
8 changes: 4 additions & 4 deletions common/src/arch-x86.C
Expand Up @@ -1096,7 +1096,7 @@ COMMON_EXPORT dyn_hash_map<entryID, std::string> entryNames_IAPI = map_list_of
(e_jo, "jo")
(e_jp, "jp")
(e_js, "js")
(e_jz, "jz")
(e_je, "je")
(e_lahf, "lahf")
(e_lar, "lar")
(e_ldmxcsr, "ldmxcsr")
Expand Down Expand Up @@ -2124,7 +2124,7 @@ list_of(x86::of)(x86::sf)(x86::zf)(x86::af)(x86::pf)(x86::cf)(x86::tf)(x86::if_)
flagTable_[e_jo] = flagInfo(list_of(x86::of)(x86::sf)(x86::zf)(x86::pf)(x86::cf), vector<Dyninst::MachRegister>());
flagTable_[e_jp] = flagInfo(list_of(x86::of)(x86::sf)(x86::zf)(x86::pf)(x86::cf), vector<Dyninst::MachRegister>());
flagTable_[e_js] = flagInfo(list_of(x86::of)(x86::sf)(x86::zf)(x86::pf)(x86::cf), vector<Dyninst::MachRegister>());
flagTable_[e_jz] = flagInfo(list_of(x86::of)(x86::sf)(x86::zf)(x86::pf)(x86::cf), vector<Dyninst::MachRegister>());
flagTable_[e_je] = flagInfo(list_of(x86::of)(x86::sf)(x86::zf)(x86::pf)(x86::cf), vector<Dyninst::MachRegister>());
flagTable_[e_lar] = flagInfo(vector<Dyninst::MachRegister>(), list_of(x86::zf));
flagTable_[e_lodsb] = flagInfo(list_of(x86::df), vector<Dyninst::MachRegister>());
flagTable_[e_lodsd] = flagInfo(list_of(x86::df), vector<Dyninst::MachRegister>());
Expand Down Expand Up @@ -2357,7 +2357,7 @@ static ia32_entry oneByteMap[256] = {
{ e_jno, t_done, 0, false, { Jb, Zz, Zz }, (IS_JCC | REL_B), s1R, 0 },
{ e_jb_jnaej_j, t_done, 0, false, { Jb, Zz, Zz }, (IS_JCC | REL_B), s1R, 0 },
{ e_jnb_jae_j, t_done, 0, false, { Jb, Zz, Zz }, (IS_JCC | REL_B), s1R, 0 },
{ e_jz, t_done, 0, false, { Jb, Zz, Zz }, (IS_JCC | REL_B), s1R, 0 },
{ e_je, t_done, 0, false, { Jb, Zz, Zz }, (IS_JCC | REL_B), s1R, 0 },
{ e_jne, t_done, 0, false, { Jb, Zz, Zz }, (IS_JCC | REL_B), s1R, 0 },
{ e_jbe, t_done, 0, false, { Jb, Zz, Zz }, (IS_JCC | REL_B), s1R, 0 },
{ e_ja, t_done, 0, false, { Jb, Zz, Zz }, (IS_JCC | REL_B), s1R, 0 },
Expand Down Expand Up @@ -2681,7 +2681,7 @@ static ia32_entry twoByteMap[256] = {
{ e_jno, t_done, 0, false, { Jz, Zz, Zz }, (IS_JCC | REL_X), s1R | (fCOND << FPOS), 0 },
{ e_jb, t_done, 0, false, { Jz, Zz, Zz }, (IS_JCC | REL_X), s1R | (fCOND << FPOS), 0 },
{ e_jae, t_done, 0, false, { Jz, Zz, Zz }, (IS_JCC | REL_X), s1R | (fCOND << FPOS), 0 },
{ e_jz, t_done, 0, false, { Jz, Zz, Zz }, (IS_JCC | REL_X), s1R | (fCOND << FPOS), 0 },
{ e_je, t_done, 0, false, { Jz, Zz, Zz }, (IS_JCC | REL_X), s1R | (fCOND << FPOS), 0 },
{ e_jne, t_done, 0, false, { Jz, Zz, Zz }, (IS_JCC | REL_X), s1R | (fCOND << FPOS), 0 },
{ e_jbe, t_done, 0, false, { Jz, Zz, Zz }, (IS_JCC | REL_X), s1R | (fCOND << FPOS), 0 },
{ e_ja, t_done, 0, false, { Jz, Zz, Zz }, (IS_JCC | REL_X), s1R | (fCOND << FPOS), 0 },
Expand Down
2 changes: 1 addition & 1 deletion dataflowAPI/src/convertOpcodes.C
Expand Up @@ -126,7 +126,7 @@ X86InstructionKind RoseInsnX86Factory::convertKind(entryID opcode, prefixEntryID
return x86_jpe;
case e_js:
return x86_js;
case e_jz:
case e_je:
return x86_je;
case e_loop:
return x86_loop;
Expand Down
2 changes: 1 addition & 1 deletion instructionAPI/src/Instruction.C
Expand Up @@ -581,7 +581,7 @@ namespace Dyninst
case e_jo:
case e_jp:
case e_js:
case e_jz:
case e_je:
return true;
default:
{
Expand Down
2 changes: 1 addition & 1 deletion instructionAPI/src/InstructionCategories.C
Expand Up @@ -70,7 +70,7 @@ namespace Dyninst
case e_jo:
case e_jp:
case e_js:
case e_jz:
case e_je:
case e_loop:
case e_loope:
case e_loopne:
Expand Down
2 changes: 1 addition & 1 deletion instructionAPI/src/Operation.C
Expand Up @@ -334,7 +334,7 @@ namespace Dyninst
nonOperandRegisterWrites.insert(make_pair(e_jo, thePC));
nonOperandRegisterWrites.insert(make_pair(e_jp, thePC));
nonOperandRegisterWrites.insert(make_pair(e_js, thePC));
nonOperandRegisterWrites.insert(make_pair(e_jz, thePC));
nonOperandRegisterWrites.insert(make_pair(e_je, thePC));

nonOperandMemoryReads.insert(make_pair(e_pop, stackPointerAsExpr));
nonOperandMemoryReads.insert(make_pair(e_popa, stackPointerAsExpr));
Expand Down
2 changes: 1 addition & 1 deletion parseAPI/src/BoundFactCalculator.C
Expand Up @@ -259,7 +259,7 @@ bool BoundFactsCalculator::CalculateBoundedFacts() {

static bool IsConditionalJump(Instruction insn) {
entryID id = insn.getOperation().getID();
if (id == e_jz || id == e_jne ||
if (id == e_je || id == e_jne ||
id == e_jb || id == e_jae ||
id == e_jbe || id == e_ja ||
id == e_jb_jnaej_j || id == e_jnb_jae_j ||
Expand Down
4 changes: 2 additions & 2 deletions parseAPI/src/BoundFactData.C
Expand Up @@ -659,7 +659,7 @@ bool BoundFact::ConditionalJumpBound(Instruction insn, EdgeTypeEnum type) {
}
break;
}
case e_jz: {
case e_je: {
if (pred.e1->getID() == AST::V_ConstantAST) {
if (pred.e2->getID() == AST::V_ConstantAST) {
parsing_printf("WARNING: both predicate elements are constants!\n");
Expand Down Expand Up @@ -870,7 +870,7 @@ bool BoundFact::ConditionalJumpBound(Instruction insn, EdgeTypeEnum type) {
}
break;
}
case e_jz: {
case e_je: {
if (pred.e1->getID() == AST::V_ConstantAST) {
if (pred.e2->getID() == AST::V_ConstantAST) {
parsing_printf("WARNING: both predicate elements are constants!\n");
Expand Down
10 changes: 5 additions & 5 deletions parseAPI/src/IdiomModelDesc.C
Expand Up @@ -74,7 +74,7 @@ IdiomModel::IdiomModel(string model_spec) {
i7.w = 7.568732;
i7.prefix = false;
i7.terms.push_back(IdiomTerm(e_cmp, MEMARG, IMMARG));
i7.terms.push_back(IdiomTerm(e_jz, x86::eip, NOARG));
i7.terms.push_back(IdiomTerm(e_je, x86::eip, NOARG));
i7.terms.push_back(IdiomTerm(e_sub, x86::esp, IMMARG));
normal.addIdiom(i7);

Expand Down Expand Up @@ -255,7 +255,7 @@ IdiomModel::IdiomModel(string model_spec) {
i33.w = 1.549826;
i33.prefix = false;
i33.terms.push_back(WILDCARD_TERM);
i33.terms.push_back(IdiomTerm(e_jz, x86::eip, NOARG));
i33.terms.push_back(IdiomTerm(e_je, x86::eip, NOARG));
normal.addIdiom(i33);

Idiom i34;
Expand Down Expand Up @@ -764,7 +764,7 @@ IdiomModel::IdiomModel(string model_spec) {
Idiom i55;
i55.w = -8.526088;
i55.prefix = true;
i55.terms.push_back(IdiomTerm(e_jz, x86::eip, NOARG));
i55.terms.push_back(IdiomTerm(e_je, x86::eip, NOARG));
reverse(i55.terms.begin(), i55.terms.end());
prefix.addIdiom(i55);

Expand Down Expand Up @@ -1069,7 +1069,7 @@ IdiomModel::IdiomModel(string model_spec) {
Idiom i36;
i36.w = 8.383780;
i36.prefix = true;
i36.terms.push_back(IdiomTerm(e_jz, x86_64::rip, NOARG));
i36.terms.push_back(IdiomTerm(e_je, x86_64::rip, NOARG));
i36.terms.push_back(IdiomTerm(e_call, x86_64::rip, NOARG));
i36.terms.push_back(IdiomTerm(e_nop, NOARG, NOARG));
reverse(i36.terms.begin(), i36.terms.end());
Expand Down Expand Up @@ -1177,7 +1177,7 @@ IdiomModel::IdiomModel(string model_spec) {
Idiom i49;
i49.w = -6.592325;
i49.prefix = true;
i49.terms.push_back(IdiomTerm(e_jz, x86_64::rip, NOARG));
i49.terms.push_back(IdiomTerm(e_je, x86_64::rip, NOARG));
reverse(i49.terms.begin(), i49.terms.end());
prefix.addIdiom(i49);

Expand Down

0 comments on commit 0ae1bdd

Please sign in to comment.