private void LoadObject(Context context) { Debug.Assert(!context.Result.IsR4); Debug.Assert(!context.Result.IsR8); LoadStore.OrderOperands(context, MethodCompiler); context.SetInstruction(X64.MovLoad64, context.Result, context.Operand1, context.Operand2); }
private void LoadZeroExtend8x32(Context context) { Debug.Assert(!context.Result.IsR4); Debug.Assert(!context.Result.IsR8); LoadStore.OrderOperands(context, MethodCompiler); TransformLoad(context, ARMv8A32.Ldr8, context.Result, StackFrame, context.Operand1); }
private void Load32(Context context) { Debug.Assert(!context.Result.IsR4); Debug.Assert(!context.Result.IsR8); LoadStore.OrderOperands(context, MethodCompiler); TransformLoad(context, ARMv8A32.Ldr32, context.Result, context.Operand1, context.Operand2); }
private static void StoreR4(Context context, MethodCompiler methodCompiler) { if (context.OperandCount == 2) { context.SetInstruction(IRInstruction.StoreR4, null, context.Operand1, methodCompiler.ConstantZero, context.Operand2); } else if (context.OperandCount == 3) { context.SetInstruction(IRInstruction.StoreR4, null, context.Operand1, context.Operand2, context.Operand3); } else { throw new CompilerException(); } LoadStore.OrderOperands(context, methodCompiler); }
private static void LoadR4(Context context, MethodCompiler methodCompiler) { if (context.OperandCount == 1) { context.SetInstruction(IRInstruction.LoadR4, context.Result, context.Operand1, methodCompiler.ConstantZero); } else if (context.OperandCount == 2) { context.SetInstruction(IRInstruction.LoadR4, context.Result, context.Operand1, context.Operand2); } else { throw new CompilerException(); } LoadStore.OrderOperands(context, methodCompiler); }
private static void LoadPointer(Context context, MethodCompiler methodCompiler) { var instruction = methodCompiler.Is32BitPlatform ? (BaseInstruction)IRInstruction.Load32 : IRInstruction.LoadZeroExtend32x64; if (context.OperandCount == 1) { context.SetInstruction(instruction, context.Result, context.Operand1, methodCompiler.ConstantZero); } else if (context.OperandCount == 2) { context.SetInstruction(instruction, context.Result, context.Operand1, context.Operand2); } else { throw new CompilerException(); } LoadStore.OrderOperands(context, methodCompiler); }
private static void StorePointer(Context context, MethodCompiler methodCompiler) { var instruction = methodCompiler.Architecture.Is32BitPlatform ? (BaseInstruction)IRInstruction.Store32 : IRInstruction.Store64; if (context.OperandCount == 2) { context.SetInstruction(instruction, null, context.Operand1, methodCompiler.ConstantZero, context.Operand2); } else if (context.OperandCount == 3) { context.SetInstruction(instruction, null, context.Operand1, context.Operand2, context.Operand3); } else { throw new CompilerException(); } LoadStore.OrderOperands(context, methodCompiler); }
private static void Store(Context context, MethodCompiler methodCompiler) { if (context.OperandCount == 2) { var instruction = !context.Operand2.IsInteger64 ? (BaseInstruction)IRInstruction.Store32 : IRInstruction.Store64; if (context.Operand2.IsR4) { instruction = IRInstruction.StoreR4; } else if (context.Operand2.IsR8) { instruction = IRInstruction.StoreR8; } context.SetInstruction(instruction, null, context.Operand1, methodCompiler.ConstantZero, context.Operand2); } else if (context.OperandCount == 3) { var instruction = !context.Operand3.IsInteger64 ? (BaseInstruction)IRInstruction.Store32 : IRInstruction.Store64; if (context.Operand3.IsR4) { instruction = IRInstruction.StoreR4; } else if (context.Operand3.IsR8) { instruction = IRInstruction.StoreR8; } context.SetInstruction(instruction, null, context.Operand1, context.Operand2, context.Operand3); } else { throw new CompilerException(); } LoadStore.OrderOperands(context, methodCompiler); }
private void StoreInt8(Context context) { LoadStore.OrderOperands(context, MethodCompiler); context.SetInstruction(X64.MovStore8, null, context.Operand1, context.Operand2, context.Operand3); }
private void LoadZeroExtend8x32(Context context) { LoadStore.OrderOperands(context, MethodCompiler); context.SetInstruction(X64.MovzxLoad8, context.Result, context.Operand1, context.Operand2); }
private void LoadSignExtend32x64(Context context) { LoadStore.OrderOperands(context, MethodCompiler); context.SetInstruction(X64.MovzxLoad32, context.Result, context.Operand1, context.Operand2); }
private void LoadR4(Context context) { LoadStore.OrderOperands(context, MethodCompiler); TransformLoad(context, ARMv8A32.Ldf, context.Result, context.Operand1, context.Operand2); }