From 9c645fbd19b69f549b7ae46c3d17f1b6407ab9b6 Mon Sep 17 00:00:00 2001 From: Tim Haines Date: Thu, 23 Nov 2023 11:05:01 -0600 Subject: [PATCH] Make popa an alias of popal popal isn't a valid mnemonic, but it's what Capstone uses. --- common/h/mnemonics/x86_entryIDs.h | 3 ++- common/src/arch-x86.C | 2 +- dataflowAPI/src/convertOpcodes.C | 2 +- instructionAPI/src/Operation.C | 2 +- parseAPI/src/IA_x86.C | 2 +- 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/common/h/mnemonics/x86_entryIDs.h b/common/h/mnemonics/x86_entryIDs.h index 74d9bdb23f..498b810391 100644 --- a/common/h/mnemonics/x86_entryIDs.h +++ b/common/h/mnemonics/x86_entryIDs.h @@ -484,7 +484,8 @@ e_pmulld, e_pmullw, e_pmuludq, e_pop, -e_popa, +e_popal, +e_popa = e_popal, e_popad, e_popcnt, e_popf, diff --git a/common/src/arch-x86.C b/common/src/arch-x86.C index 66a525759e..2b1c76cdb7 100644 --- a/common/src/arch-x86.C +++ b/common/src/arch-x86.C @@ -1267,7 +1267,7 @@ COMMON_EXPORT dyn_hash_map entryNames_IAPI = map_list_of (e_pmulld, "pmulld") (e_pmuludq, "pmuludq") (e_pop, "pop") - (e_popa, "popa") + (e_popal, "popa") (e_popad, "popad") (e_popcnt, "popcnt") (e_popf, "popf") diff --git a/dataflowAPI/src/convertOpcodes.C b/dataflowAPI/src/convertOpcodes.C index 730340a98d..e0651b72fd 100644 --- a/dataflowAPI/src/convertOpcodes.C +++ b/dataflowAPI/src/convertOpcodes.C @@ -692,7 +692,7 @@ X86InstructionKind RoseInsnX86Factory::convertKind(entryID opcode, prefixEntryID return x86_pmuludq; case e_pop: return x86_pop; - case e_popa: + case e_popal: return x86_popa; case e_popad: return x86_popad; diff --git a/instructionAPI/src/Operation.C b/instructionAPI/src/Operation.C index 9d2707fa1c..f8d3006487 100644 --- a/instructionAPI/src/Operation.C +++ b/instructionAPI/src/Operation.C @@ -337,7 +337,7 @@ namespace Dyninst nonOperandRegisterWrites.insert(make_pair(e_je, thePC)); nonOperandMemoryReads.insert(make_pair(e_pop, stackPointerAsExpr)); - nonOperandMemoryReads.insert(make_pair(e_popa, stackPointerAsExpr)); + nonOperandMemoryReads.insert(make_pair(e_popal, stackPointerAsExpr)); nonOperandMemoryReads.insert(make_pair(e_popad, stackPointerAsExpr)); nonOperandMemoryWrites.insert(make_pair(e_push, stackPointerAsExpr)); nonOperandMemoryWrites.insert(make_pair(e_pusha, stackPointerAsExpr)); diff --git a/parseAPI/src/IA_x86.C b/parseAPI/src/IA_x86.C index 43cf4b4342..c8dfaa5ffa 100644 --- a/parseAPI/src/IA_x86.C +++ b/parseAPI/src/IA_x86.C @@ -561,7 +561,7 @@ bool IA_x86::isFakeCall() const case e_pushad: sign = -1; //FALLTHROUGH - case e_popa: + case e_popal: case e_popad: if (1 == sign) { mal_printf("popad ins'n at %lx in func at %lx changes sp "