From 0f4318e36ca46ac05db5a94c7af48ded5d56d50f Mon Sep 17 00:00:00 2001 From: xbzk Date: Mon, 7 Sep 2026 00:43:44 -0300 Subject: [PATCH] [nce] avoid cyrilic utf8 strings being interpreted as exclusive store instructions --- src/core/arm/nce/instructions.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/core/arm/nce/instructions.h b/src/core/arm/nce/instructions.h index 451778df65..6c71b6acf2 100644 --- a/src/core/arm/nce/instructions.h +++ b/src/core/arm/nce/instructions.h @@ -121,7 +121,10 @@ union Exclusive { constexpr explicit Exclusive(u32 raw_) : raw{raw_} {} constexpr bool Verify() { - return this->GetSig() == 0x10; + if (this->GetSig() != 0x10) return false; + const bool pair = decltype(l)::ExtractValue(raw) & 1; + const bool fixed_rt2 = decltype(rt2)::ExtractValue(raw) == 0b11111; + return pair || fixed_rt2; } constexpr u32 GetSig() {