From c6d0dc133447db24ab00bc37513bea5e46be77b0 Mon Sep 17 00:00:00 2001 From: LDj3SNuD <35856442+LDj3SNuD@users.noreply.github.com> Date: Wed, 4 Jul 2018 22:04:39 +0200 Subject: [PATCH] Update AInstEmitSimdArithmetic.cs --- ChocolArm64/Instruction/AInstEmitSimdArithmetic.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ChocolArm64/Instruction/AInstEmitSimdArithmetic.cs b/ChocolArm64/Instruction/AInstEmitSimdArithmetic.cs index b96b71be46..ac0fa84103 100644 --- a/ChocolArm64/Instruction/AInstEmitSimdArithmetic.cs +++ b/ChocolArm64/Instruction/AInstEmitSimdArithmetic.cs @@ -99,11 +99,14 @@ namespace ChocolArm64.Instruction int Bytes = Context.CurrOp.GetBitsCount() >> 3; - for (int Index = 0; Index < (Bytes >> Op.Size); Index++) + int Elems = Bytes >> Op.Size; + int ESize = 8 << Op.Size; + + for (int Index = 0; Index < Elems; Index++) { EmitVectorExtractZx(Context, Op.Rn, Index, Op.Size); - Context.EmitLdc_I4(8 << Op.Size); + Context.EmitLdc_I4(ESize); Emit();