From 85c3ed12b15f85cb2a6df7802e1902e390c891d4 Mon Sep 17 00:00:00 2001
From: Jason Hiser <jdhiser@gmail.com>
Date: Mon, 6 May 2019 14:33:03 -0400
Subject: [PATCH] arm32 update to avoid SetInterrupt when it shouldn't be set

---
 src/base/SMPInstr.cpp | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/base/SMPInstr.cpp b/src/base/SMPInstr.cpp
index cafbb1e2..bdbcd661 100644
--- a/src/base/SMPInstr.cpp
+++ b/src/base/SMPInstr.cpp
@@ -8952,6 +8952,9 @@ bool SMPInstr::FillCmd(void) {
 
 // Analyze the instruction and its operands.
 void SMPInstr::Analyze(void) {
+	const auto pt     = global_STARS_program->GetProcessorType();
+	const auto is_x86 = pt==ptX86_64 || pt==ptX86_32;
+
 	bool DebugFlag = false;
 	STARS_ea_t InstAddr = this->GetAddr();
 
@@ -8973,7 +8976,8 @@ void SMPInstr::Analyze(void) {
 	// Record optimization category.
 	// this->OptType = global_STARS_program->GetOptCategory(opcode);
 
-	if ((STARS_NN_int == opcode) || (STARS_NN_into == opcode) || (STARS_NN_int3 == opcode)) {
+	const auto is_x86_interrupt = (STARS_NN_int == opcode) || (STARS_NN_into == opcode) || (STARS_NN_int3 == opcode);
+	if (is_x86 && is_x86_interrupt) {
 		this->SetInterrupt();
 	}
 	else {
-- 
GitLab