public SetInstruction ( |
||
instruction | The instruction. | |
condition | ConditionCode | The condition. |
updateStatus | bool | if set to |
result | Operand | The result. |
operand1 | Operand | The operand1. |
operand2 | Operand | The operand2. |
Résultat | void |
public void SetInstruction(BaseInstruction instruction, ConditionCode condition, bool updateStatus, Operand result, Operand operand1, Operand operand2)
{
Node.SetInstruction(instruction, condition, updateStatus, result, operand1, operand2);
}
Context::SetInstruction ( |
|
Context::SetInstruction ( |
|
Context::SetInstruction ( |
|
Context::SetInstruction ( |
|
Context::SetInstruction ( |
|
Context::SetInstruction ( |
|
Context::SetInstruction ( |
|
Context::SetInstruction ( |
|
Context::SetInstruction ( |
|
Context::SetInstruction ( |
|
Context::SetInstruction ( |
|
Context::SetInstruction ( |
|
Context::SetInstruction ( |
|
Context::SetInstruction ( |
|
Context::SetInstruction ( |
|
Context::SetInstruction ( |
|
Context::SetInstruction ( |
|
Context::SetInstruction ( |
|
Context::SetInstruction ( |
|
Context::SetInstruction ( |
/// <summary> /// Replaces the intrinsic call site /// </summary> /// <param name="context">The context.</param> /// <param name="typeSystem">The type system.</param> void IIntrinsicPlatformMethod.ReplaceIntrinsicCall(Context context, ITypeSystem typeSystem, IList<RuntimeParameter> parameters) { var result = context.Result; var op1 = context.Operand1; var op2 = context.Operand2; var constant = Operand.CreateConstant(BuiltInSigType.IntPtr, parameters.Count * 4); var eax = Operand.CreateCPURegister(BuiltInSigType.IntPtr, GeneralPurposeRegister.EAX); // FIXME - need access to virtual register allocator var edx = Operand.CreateCPURegister(BuiltInSigType.IntPtr, GeneralPurposeRegister.EDX); // FIXME - need access to virtual register allocator var esp = Operand.CreateCPURegister(BuiltInSigType.IntPtr, GeneralPurposeRegister.ESP); // FIXME - need access to virtual register allocator var ebp = Operand.CreateCPURegister(BuiltInSigType.IntPtr, GeneralPurposeRegister.EBP); // FIXME - need access to virtual register allocator context.SetInstruction(X86.Sub, esp, constant); context.AppendInstruction(X86.Mov, edx, esp); var size = parameters.Count * 4 + 4; foreach (var parameter in parameters) { context.AppendInstruction(X86.Mov, Operand.CreateMemoryAddress(BuiltInSigType.IntPtr, edx, new IntPtr(size - 4)), Operand.CreateMemoryAddress(BuiltInSigType.IntPtr, ebp, new IntPtr(size + 4))); size -= 4; } context.AppendInstruction(X86.Mov, Operand.CreateMemoryAddress(BuiltInSigType.IntPtr, edx, new IntPtr(size - 4)), op1); context.AppendInstruction(X86.Mov, eax, op2); context.AppendInstruction(X86.Call, null, eax); context.AppendInstruction(X86.Add, esp, constant); context.AppendInstruction(X86.Mov, result, Operand.CreateCPURegister(result.Type, GeneralPurposeRegister.EAX)); // FIXME - need access to virtual register allocator }