From 0ae1bdda2b88cea4c8988d44d377075065cf74d9 Mon Sep 17 00:00:00 2001 From: Tim Haines Date: Thu, 23 Nov 2023 11:01:48 -0600 Subject: [PATCH] Make jz an alias of je --- common/h/mnemonics/x86_entryIDs.h | 2 +- common/src/arch-x86.C | 8 ++++---- dataflowAPI/src/convertOpcodes.C | 2 +- instructionAPI/src/Instruction.C | 2 +- instructionAPI/src/InstructionCategories.C | 2 +- instructionAPI/src/Operation.C | 2 +- parseAPI/src/BoundFactCalculator.C | 2 +- parseAPI/src/BoundFactData.C | 4 ++-- parseAPI/src/IdiomModelDesc.C | 10 +++++----- 9 files changed, 17 insertions(+), 17 deletions(-) diff --git a/common/h/mnemonics/x86_entryIDs.h b/common/h/mnemonics/x86_entryIDs.h index 60b4fdd76e..b75deee553 100644 --- a/common/h/mnemonics/x86_entryIDs.h +++ b/common/h/mnemonics/x86_entryIDs.h @@ -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, @@ -261,7 +262,6 @@ e_jo, e_jp, e_jrcxz, e_js, -e_jz, e_kaddb, e_kaddd, e_kaddq, diff --git a/common/src/arch-x86.C b/common/src/arch-x86.C index 3466e7a4f5..b6b050b229 100644 --- a/common/src/arch-x86.C +++ b/common/src/arch-x86.C @@ -1096,7 +1096,7 @@ COMMON_EXPORT dyn_hash_map 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") @@ -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()); flagTable_[e_jp] = flagInfo(list_of(x86::of)(x86::sf)(x86::zf)(x86::pf)(x86::cf), vector()); flagTable_[e_js] = flagInfo(list_of(x86::of)(x86::sf)(x86::zf)(x86::pf)(x86::cf), vector()); - flagTable_[e_jz] = flagInfo(list_of(x86::of)(x86::sf)(x86::zf)(x86::pf)(x86::cf), vector()); + flagTable_[e_je] = flagInfo(list_of(x86::of)(x86::sf)(x86::zf)(x86::pf)(x86::cf), vector()); flagTable_[e_lar] = flagInfo(vector(), list_of(x86::zf)); flagTable_[e_lodsb] = flagInfo(list_of(x86::df), vector()); flagTable_[e_lodsd] = flagInfo(list_of(x86::df), vector()); @@ -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 }, @@ -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 }, diff --git a/dataflowAPI/src/convertOpcodes.C b/dataflowAPI/src/convertOpcodes.C index 880422b906..730340a98d 100644 --- a/dataflowAPI/src/convertOpcodes.C +++ b/dataflowAPI/src/convertOpcodes.C @@ -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; diff --git a/instructionAPI/src/Instruction.C b/instructionAPI/src/Instruction.C index a9bc725770..e4be6df13b 100644 --- a/instructionAPI/src/Instruction.C +++ b/instructionAPI/src/Instruction.C @@ -581,7 +581,7 @@ namespace Dyninst case e_jo: case e_jp: case e_js: - case e_jz: + case e_je: return true; default: { diff --git a/instructionAPI/src/InstructionCategories.C b/instructionAPI/src/InstructionCategories.C index 68c3609a78..761b6e4591 100644 --- a/instructionAPI/src/InstructionCategories.C +++ b/instructionAPI/src/InstructionCategories.C @@ -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: diff --git a/instructionAPI/src/Operation.C b/instructionAPI/src/Operation.C index 4999078ef4..9d2707fa1c 100644 --- a/instructionAPI/src/Operation.C +++ b/instructionAPI/src/Operation.C @@ -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)); diff --git a/parseAPI/src/BoundFactCalculator.C b/parseAPI/src/BoundFactCalculator.C index 14e5d28a57..da1f2f503b 100644 --- a/parseAPI/src/BoundFactCalculator.C +++ b/parseAPI/src/BoundFactCalculator.C @@ -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 || diff --git a/parseAPI/src/BoundFactData.C b/parseAPI/src/BoundFactData.C index 90f206f601..deed4926ce 100644 --- a/parseAPI/src/BoundFactData.C +++ b/parseAPI/src/BoundFactData.C @@ -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"); @@ -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"); diff --git a/parseAPI/src/IdiomModelDesc.C b/parseAPI/src/IdiomModelDesc.C index 1648f11f6b..09a5554507 100644 --- a/parseAPI/src/IdiomModelDesc.C +++ b/parseAPI/src/IdiomModelDesc.C @@ -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); @@ -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; @@ -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); @@ -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()); @@ -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);