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(Registers.eflags, iSz, arch.GrfToString(iSz), PrimitiveType.Byte); using (FileUnitTester fut = new FileUnitTester("Core/FrGrfTest.txt")) { f.Write(fut.TextWriter); fut.AssertFilesEqual(); } }
public void AddFlagGroupReturnValue(uint grf, Frame frame) { PrimitiveType dt = SingleBitSet(grf) ? PrimitiveType.Bool : PrimitiveType.Byte; ret = frame.EnsureFlagGroup(grf, arch.GrfToString(grf), dt); }
public void Setup() { m = new ProcedureBuilder(arch); frame = m.Frame; ax = frame.EnsureRegister(new RegisterStorage("ax", 0, 0, PrimitiveType.Word16)); bx = frame.EnsureRegister(new RegisterStorage("bx", 3, 0, PrimitiveType.Word16)); cx = frame.EnsureRegister(new RegisterStorage("cx", 1, 0, PrimitiveType.Word16)); dx = frame.EnsureRegister(new RegisterStorage("dx", 2, 0, PrimitiveType.Word16)); flags = new FlagRegister("flags", PrimitiveType.Word16); SCZ = frame.EnsureFlagGroup(flags, 7, "SCZ", PrimitiveType.Byte); CF = frame.EnsureFlagGroup(flags, 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 = Bits.IsSingleBitSet(grf) ? PrimitiveType.Bool : PrimitiveType.Byte; ret = frame.EnsureFlagGroup(grf, arch.GrfToString(grf), dt); }
public void AddFlagGroupReturnValue(uint bitMask, Frame frame) { PrimitiveType dt = Bits.IsSingleBitSet(bitMask) ? PrimitiveType.Bool : PrimitiveType.Byte; var grf = arch.GetFlagGroup(bitMask); ret = frame.EnsureFlagGroup(grf.FlagRegister, bitMask, grf.Name, dt); }
public Expression VisitFlagGroupStorage(FlagGroupStorage grf) { return(frame.EnsureFlagGroup(grf.FlagRegister, grf.FlagGroupBits, grf.Name, grf.DataType)); }