From c3a48b8f5c40b2dcef950ff8f211c16a338d2f47 Mon Sep 17 00:00:00 2001 From: gdkchan Date: Fri, 6 Apr 2018 17:22:26 -0300 Subject: [PATCH] [CPU] Fix CBZ/CBNZ with 32 bits operands --- Decoder/AOpCodeBImmCmp.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Decoder/AOpCodeBImmCmp.cs b/Decoder/AOpCodeBImmCmp.cs index 1b6185d..0f16b73 100644 --- a/Decoder/AOpCodeBImmCmp.cs +++ b/Decoder/AOpCodeBImmCmp.cs @@ -1,4 +1,5 @@ using ChocolArm64.Instruction; +using ChocolArm64.State; namespace ChocolArm64.Decoder { @@ -11,6 +12,10 @@ namespace ChocolArm64.Decoder Rt = OpCode & 0x1f; Imm = Position + ADecoderHelper.DecodeImmS19_2(OpCode); + + RegisterSize = (OpCode >> 31) != 0 + ? ARegisterSize.Int64 + : ARegisterSize.Int32; } } } \ No newline at end of file