本文整理汇总了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);
}