本文整理汇总了C#中Reko.Core.Frame.EnsureFlagGroup方法的典型用法代码示例。如果您正苦于以下问题:C# Frame.EnsureFlagGroup方法的具体用法?C# Frame.EnsureFlagGroup怎么用?C# Frame.EnsureFlagGroup使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Reko.Core.Frame
的用法示例。
在下文中一共展示了Frame.EnsureFlagGroup方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: FrGrfTest
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();
}
}
示例2: AddFlagGroupReturnValue
public void AddFlagGroupReturnValue(uint grf, Frame frame)
{
PrimitiveType dt = SingleBitSet(grf) ? PrimitiveType.Bool : PrimitiveType.Byte;
ret = frame.EnsureFlagGroup(grf, arch.GrfToString(grf), dt);
}
示例3: Setup
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");
}
示例4: AddFlagGroupReturnValue
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);
}