From 1e29ef8b0ec8cdcbb64f83ebdbb54baea2064c42 Mon Sep 17 00:00:00 2001
From: MerryMage <MerryMage@users.noreply.github.com>
Date: Sun, 7 Feb 2021 14:18:03 +0000
Subject: [PATCH] A32/location_descriptor: Implement SetIT

---
 src/frontend/A32/location_descriptor.h | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/frontend/A32/location_descriptor.h b/src/frontend/A32/location_descriptor.h
index 36c830a2..31e3ba21 100644
--- a/src/frontend/A32/location_descriptor.h
+++ b/src/frontend/A32/location_descriptor.h
@@ -88,13 +88,17 @@ public:
         return LocationDescriptor(arm_pc, cpsr, A32::FPSCR{new_fpscr & FPSCR_MODE_MASK}, single_stepping);
     }
 
-    LocationDescriptor AdvanceIT() const {
+    LocationDescriptor SetIT(ITState new_it) const {
         PSR new_cpsr = cpsr;
-        new_cpsr.IT(new_cpsr.IT().Advance());
+        new_cpsr.IT(new_it);
 
         return LocationDescriptor(arm_pc, new_cpsr, fpscr, single_stepping);
     }
 
+    LocationDescriptor AdvanceIT() const {
+        return SetIT(IT().Advance());
+    }
+
     LocationDescriptor SetSingleStepping(bool new_single_stepping) const {
         return LocationDescriptor(arm_pc, cpsr, fpscr, new_single_stepping);
     }