From 1bff2519a50ac4e3ca98b4d874f70c02628c3f4a Mon Sep 17 00:00:00 2001 From: Samuel Arnold Date: Thu, 18 Jun 2026 12:48:36 -0700 Subject: Add armv7::InstDecoder::in_thumb_mode() method --- CHANGELOG | 2 ++ src/armv7.rs | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index fa8ed2f..b53d6b4 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -7,6 +7,8 @@ * support non-`*2` forms of coprocessor instructions * collapse `*2` encoding choice for coprocessor instructions into a paramter on the opcode (rather than distinct opcodes) +* ARMv7: added `armv7::InstDecoder::in_thumb_mode` to read back if an ARMv7 + decoder is operating in thumb mode. thank you for the patch, @Grond66! ## 0.4.0 diff --git a/src/armv7.rs b/src/armv7.rs index cb46d60..2ce8122 100644 --- a/src/armv7.rs +++ b/src/armv7.rs @@ -1131,6 +1131,11 @@ impl InstDecoder { self } + /// returns whether the decoder is currently set to decode in Thumb mode + pub fn in_thumb_mode(&self) -> bool { + self.thumb + } + /// initialize a new `arm` `InstDecoder` with default ("everything") support, but in `thumb` /// mode. pub fn default_thumb() -> Self { -- cgit v1.1