本文整理匯總了C#中Mosa.Compiler.Framework.InstructionNode.ToString方法的典型用法代碼示例。如果您正苦於以下問題:C# InstructionNode.ToString方法的具體用法?C# InstructionNode.ToString怎麽用?C# InstructionNode.ToString使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Mosa.Compiler.Framework.InstructionNode
的用法示例。
在下文中一共展示了InstructionNode.ToString方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: EmitInstruction
protected override void EmitInstruction(InstructionNode node, BaseCodeEmitter codeEmitter)
{
long start = codeEmitter.CurrentPosition;
base.EmitInstruction(node, codeEmitter);
long end = codeEmitter.CurrentPosition;
var instruction = simAdapter.Convert(node, MethodCompiler.Method, BasicBlocks, (byte)(end - start));
if (instruction != null)
{
simLinker.AddInstruction(symbol, start, instruction);
}
simLinker.AddSourceInformation(symbol, start, node.SlotNumber.ToString() + "\t0x" + node.SlotNumber.ToString("X") + "\t" + node.Block.ToString() + "\t" + symbol + "\t" + node.ToString());
}
示例2: LogInstructions
/// <summary>
/// Logs the instructions in the given enumerable to the trace.
/// </summary>
/// <param name="traceLog">The trace log.</param>
/// <param name="node">The context.</param>
private static void LogInstructions(TraceLog traceLog, InstructionNode node)
{
for (; !node.IsBlockEndInstruction; node = node.Next)
{
if (node.IsEmpty)
continue;
traceLog.Log(node.ToString());
if (node.IsBlockEndInstruction)
return;
}
}
示例3: Emit
/// <summary>
/// Emits the specified platform instruction.
/// </summary>
/// <param name="node">The context.</param>
/// <param name="emitter">The emitter.</param>
protected override void Emit(InstructionNode node, MachineCodeEmitter emitter)
{
Debug.Assert(node.Result == node.Operand1, node.ToString());
OpCode opCode = ComputeOpCode(node.Result, node.Operand1, node.Operand2);
emitter.Emit(opCode, node.Result, node.Operand2);
}