Browse Source

Fix load/store exclusive/atomic pairwise instructions (#337)

gdkchan 7 years ago
parent
commit
267af1f0f7
1 changed files with 2 additions and 2 deletions
  1. 2 2
      ChocolArm64/Instruction/AInstEmitMemoryEx.cs

+ 2 - 2
ChocolArm64/Instruction/AInstEmitMemoryEx.cs

@@ -75,7 +75,7 @@ namespace ChocolArm64.Instruction
             {
             {
                 Context.EmitLdarg(ATranslatedSub.MemoryArgIdx);
                 Context.EmitLdarg(ATranslatedSub.MemoryArgIdx);
                 Context.EmitLdtmp();
                 Context.EmitLdtmp();
-                Context.EmitLdc_I(8 << Op.Size);
+                Context.EmitLdc_I8(1 << Op.Size);
 
 
                 Context.Emit(OpCodes.Add);
                 Context.Emit(OpCodes.Add);
 
 
@@ -145,7 +145,7 @@ namespace ChocolArm64.Instruction
             {
             {
                 Context.EmitLdarg(ATranslatedSub.MemoryArgIdx);
                 Context.EmitLdarg(ATranslatedSub.MemoryArgIdx);
                 Context.EmitLdint(Op.Rn);
                 Context.EmitLdint(Op.Rn);
-                Context.EmitLdc_I(8 << Op.Size);
+                Context.EmitLdc_I8(1 << Op.Size);
 
 
                 Context.Emit(OpCodes.Add);
                 Context.Emit(OpCodes.Add);