public void FrGrfTest() { IntelArchitecture arch = new IntelArchitecture(ProcessorMode.Real); Frame f = new Frame(PrimitiveType.Word16); uint iSz = (uint) (FlagM.ZF|FlagM.SF); Identifier grfSz = f.EnsureFlagGroup(iSz, arch.GrfToString(iSz), PrimitiveType.Byte); using (FileUnitTester fut = new FileUnitTester("Core/FrGrfTest.txt")) { f.Write(fut.TextWriter); fut.AssertFilesEqual(); } }
public void Setup() { m = new ProcedureBuilder(arch); frame = m.Frame; ax = frame.EnsureRegister(new RegisterStorage("ax", 0, PrimitiveType.Word16)); bx = frame.EnsureRegister(new RegisterStorage("bx", 3, PrimitiveType.Word16)); cx = frame.EnsureRegister(new RegisterStorage("cx", 1, PrimitiveType.Word16)); dx = frame.EnsureRegister(new RegisterStorage("dx", 2, PrimitiveType.Word16)); SCZ = frame.EnsureFlagGroup(7, "SCZ", PrimitiveType.Byte); CF = frame.EnsureFlagGroup(arch.CarryFlagMask, "C", PrimitiveType.Bool); rw = new LongAddRewriter(m.Procedure, arch); Procedure proc = new Procedure("test", frame); block = new Block(proc, "bloke"); }
public void AddFlagGroupReturnValue(uint grf, Frame frame) { PrimitiveType dt = SingleBitSet(grf) ? PrimitiveType.Bool : PrimitiveType.Byte; ret = frame.EnsureFlagGroup(grf, arch.GrfToString(grf), dt); }