From 980691f36bd7f18b98b636a2ad389c943571877c 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 --- ChocolArm64/Decoder/AOpCodeBImmCmp.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ChocolArm64/Decoder/AOpCodeBImmCmp.cs b/ChocolArm64/Decoder/AOpCodeBImmCmp.cs index 1b6185da61..0f16b73e0e 100644 --- a/ChocolArm64/Decoder/AOpCodeBImmCmp.cs +++ b/ChocolArm64/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