/// <summary> /// Emits the specified platform instruction. /// </summary> /// <param name="node">The node.</param> /// <param name="emitter">The emitter.</param> internal override void EmitLegacy(InstructionNode node, X86CodeEmitter emitter) { if (node.OperandCount == 0) { emitter.EmitRelativeBranch(CALL, node.BranchTargets[0].Label); return; } if (node.Operand1.IsSymbol) { emitter.WriteByte(0xE8); emitter.EmitCallSite(node.Operand1); } else { emitter.Emit(RegCall, node.Operand1); } }
/// <summary> /// Emits the specified platform instruction. /// </summary> /// <param name="node">The node.</param> /// <param name="emitter">The emitter.</param> internal override void EmitLegacy(InstructionNode node, X86CodeEmitter emitter) { if (node.Operand1 == null) { emitter.EmitRelativeBranch(JMP, node.BranchTargets[0].Label); } else { if (node.Operand1.IsSymbol) { emitter.WriteByte(0xE9); emitter.EmitCallSite(node.Operand1); } else if (node.Operand1.IsCPURegister) { emitter.Emit(JMP_R, node.Operand1); } } }