diff --git a/lib/external/libwolv b/lib/external/libwolv index 3b7a928b7..34d36a2f3 160000 --- a/lib/external/libwolv +++ b/lib/external/libwolv @@ -1 +1 @@ -Subproject commit 3b7a928b7e53e98c5ef7372f1429032f6d622c10 +Subproject commit 34d36a2f3397143a79b31fa4ba0f57f91ba0600e diff --git a/lib/libimhex/include/hex/helpers/disassembler.hpp b/lib/libimhex/include/hex/helpers/disassembler.hpp index 1d7f7ae55..f4be62932 100644 --- a/lib/libimhex/include/hex/helpers/disassembler.hpp +++ b/lib/libimhex/include/hex/helpers/disassembler.hpp @@ -20,10 +20,16 @@ namespace hex { TMS320C64X, M680X, EVM, - MOS65XX, WASM, + #if defined(CS_MODE_RISCV32) + RISCV, + #endif + #if defined(CS_MODE_MOS65XX_6502) + MOS65XX, + #endif + #if defined(CS_MODE_BPF_CLASSIC) BPF, - RISCV, + #endif MAX, MIN = ARM diff --git a/plugins/builtin/source/content/views/view_disassembler.cpp b/plugins/builtin/source/content/views/view_disassembler.cpp index 206280015..21b13bfcd 100644 --- a/plugins/builtin/source/content/views/view_disassembler.cpp +++ b/plugins/builtin/source/content/views/view_disassembler.cpp @@ -186,12 +186,17 @@ namespace hex::plugin::builtin { static bool qpx = false; ImGui::Checkbox("hex.builtin.view.disassembler.ppc.qpx"_lang, &qpx); - static bool spe = false; - ImGui::Checkbox("hex.builtin.view.disassembler.ppc.spe"_lang, &spe); - static bool booke = false; - ImGui::Checkbox("hex.builtin.view.disassembler.ppc.booke"_lang, &booke); - this->m_mode = cs_mode(mode | (qpx ? CS_MODE_QPX : cs_mode(0)) | (spe ? CS_MODE_SPE : cs_mode(0)) | (booke ? CS_MODE_BOOKE : cs_mode(0))); + #if defined (CS_MODE_SPE) + static bool spe = false; + ImGui::Checkbox("hex.builtin.view.disassembler.ppc.spe"_lang, &spe); + static bool booke = false; + ImGui::Checkbox("hex.builtin.view.disassembler.ppc.booke"_lang, &booke); + + this->m_mode = cs_mode(mode | (qpx ? CS_MODE_QPX : cs_mode(0)) | (spe ? CS_MODE_SPE : cs_mode(0)) | (booke ? CS_MODE_BOOKE : cs_mode(0))); + #else + this->m_mode = cs_mode(mode | (qpx ? CS_MODE_QPX : cs_mode(0))); + #endif } break; case Architecture::SPARC: @@ -202,6 +207,7 @@ namespace hex::plugin::builtin { this->m_mode = cs_mode(v9Mode ? CS_MODE_V9 : cs_mode(0)); } break; + #if defined (CS_MODE_RISCV32) case Architecture::RISCV: { static int mode = CS_MODE_RISCV32; @@ -215,6 +221,7 @@ namespace hex::plugin::builtin { this->m_mode = cs_mode(mode | (compressed ? CS_MODE_RISCVC : cs_mode(0))); } break; + #endif case Architecture::M68K: { static int selectedMode = 0; @@ -267,6 +274,7 @@ namespace hex::plugin::builtin { this->m_mode = cs_mode(modes[selectedMode].second); } break; + #if defined(CS_MODE_MOS65XX_6502) case Architecture::MOS65XX: { static int selectedMode = 0; @@ -292,6 +300,8 @@ namespace hex::plugin::builtin { this->m_mode = cs_mode(modes[selectedMode].second); } break; + #endif + #if defined(CS_MODE_BPF_CLASSIC) case Architecture::BPF: { static int mode = CS_MODE_BPF_CLASSIC; @@ -302,6 +312,7 @@ namespace hex::plugin::builtin { this->m_mode = cs_mode(mode); } break; + #endif case Architecture::EVM: case Architecture::TMS320C64X: case Architecture::ARM64: