Cosmos/source2/IL2PCU/Cosmos.IL2CPU.X86/AssemblerNasm.cs
kudzu_cp 76b48915c3
2009-07-26 23:39:14 +00:00

26 lines
918 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Cosmos.IL2CPU.X86 {
public class AssemblerNasm : Assembler {
protected override void InitILOps() {
InitILOps(typeof(ILOp));
}
// These are all temp functions until we move to the new assembler.
// They are used to clean up the old assembler slightly while retaining compatibiltiy for now
public static string TmpPosLabel(uint aMethodUID, ILOpCode aOpCode) {
//TODO: Change to Hex output, will be smaller and slightly faster for NASM
return "_" + aMethodUID + "_" + aOpCode.Position + "__";
}
public static string TmpBranchLabel(uint aMethodUID, ILOpCode aOpCode) {
//TODO: Change to Hex output, will be smaller and slightly faster for NASM
return "_" + aMethodUID + "_" + ((ILOpCodes.OpBranch)aOpCode).Value + "__";
}
}
}