diff --git a/src/base/SMPInstr.cpp b/src/base/SMPInstr.cpp index a10ed420bc9dfe19cc17f18a43c3c95b49bddfc6..5098e2e5c8a88a2f579dfbeae3cb0cdda56a688b 100644 --- a/src/base/SMPInstr.cpp +++ b/src/base/SMPInstr.cpp @@ -21832,8 +21832,9 @@ bool SMPInstr::BuildRTL(void) { switch(global_STARS_program->GetProcessorType()) { + case ptARM: case ptARM64: - return BuildARM64RTL(); + return BuildARM64RTL(); // shared for arm32 (arm) and arm64 (aarch64). case ptX86_64: case ptX86_32: return BuildX86RTL(); @@ -21875,7 +21876,7 @@ bool SMPInstr::BuildARM64RTL(void) case STARS_ARM_bx: // Branch to/from Thumb mode case STARS_ARM_blx1: // Branch with Link and Exchange (immediate address) case STARS_ARM_blx2: // Branch with Link and Exchange (register indirect) - assert(0); // arm 32 + return this->BuildCallRTL(); // arm/thumb 32 case STARS_ARM_tbz: // Test and Branch Zero case STARS_ARM_cbz: // Compare and Branch on Zero diff --git a/src/drivers/idapro/SMPStaticAnalyzer.cpp b/src/drivers/idapro/SMPStaticAnalyzer.cpp index 33f4eb1d8e015f663e3e4c93271a55ee9624292d..7d82886fa9793e8d1f4e4a5e234faced21c621c1 100644 --- a/src/drivers/idapro/SMPStaticAnalyzer.cpp +++ b/src/drivers/idapro/SMPStaticAnalyzer.cpp @@ -386,16 +386,16 @@ bool IDAP_run(size_t arg) { if (inf.is_64bit()) { global_STARS_program->Set64BitBinary(); - const auto pt = (ph.id == PLFM_386) ? ptX86_32 : - (ph.id == PLFM_ARM) ? ptARM64 : + const auto pt = (ph.id == PLFM_386) ? ptX86_64 : + (ph.id == PLFM_ARM) ? ptARM64 : throw invalid_argument("Unknown machine type"); global_STARS_program->SetProcessorType(pt); SMP_msg("INFO: 64-bit binary detected.\n"); } else { global_STARS_program->Set32BitBinary(); - const auto pt = (ph.id == PLFM_386) ? ptX86_64 : - (ph.id == PLFM_ARM) ? ptARM64 : + const auto pt = (ph.id == PLFM_386) ? ptX86_32 : + (ph.id == PLFM_ARM) ? ptARM : throw invalid_argument("Unknown machine type"); global_STARS_program->SetProcessorType(pt); SMP_msg("INFO: 32-bit binary detected.\n");