public static void Sys(ArmEmitterContext context) { // This instruction is used to do some operations on the CPU like cache invalidation, // address translation and the like. // We treat it as no-op here since we don't have any cache being emulated anyway. OpCodeSystem op = (OpCodeSystem)context.CurrOp; switch (GetPackedId(op)) { case 0b11_011_0111_0100_001: { // DC ZVA Operand t = GetIntOrZR(context, op.Rt); for (long offset = 0; offset < (4 << DczSizeLog2); offset += 8) { Operand address = context.Add(t, Const(offset)); InstEmitMemoryHelper.EmitStore(context, address, RegisterConsts.ZeroIndex, 3); } break; } // No-op case 0b11_011_0111_1110_001: //DC CIVAC break; } }
public static void Sys(ArmEmitterContext context) { // This instruction is used to do some operations on the CPU like cache invalidation, // address translation and the like. // We treat it as no-op here since we don't have any cache being emulated anyway. OpCodeSystem op = (OpCodeSystem)context.CurrOp; switch (GetPackedId(op)) { case 0b11_011_0111_0100_001: { // DC ZVA Operand t = GetIntOrZR(context, op.Rt); for (long offset = 0; offset < DczSizeInBytes; offset += 8) { Operand address = context.Add(t, Const(offset)); InstEmitMemoryHelper.EmitStore(context, address, RegisterConsts.ZeroIndex, 3); } break; } // No-op case 0b11_011_0111_1110_001: // DC CIVAC break; case 0b11_011_0111_0101_001: // IC IVAU Operand target = Register(op.Rt, RegisterType.Integer, OperandType.I64); context.Call(typeof(NativeInterface).GetMethod(nameof(NativeInterface.InvalidateCacheLine)), target); break; } }
public static void Str(ArmEmitterContext context) { OpCodeMem op = (OpCodeMem)context.CurrOp; Operand address = GetAddress(context); InstEmitMemoryHelper.EmitStore(context, address, op.Rt, op.Size); EmitWBackIfNeeded(context, address); }
public static void Stp(ArmEmitterContext context) { OpCodeMemPair op = (OpCodeMemPair)context.CurrOp; Operand address = GetAddress(context); Operand address2 = context.Add(address, Const(1L << op.Size)); InstEmitMemoryHelper.EmitStore(context, address, op.Rt, op.Size); InstEmitMemoryHelper.EmitStore(context, address2, op.Rt2, op.Size); EmitWBackIfNeeded(context, address); }