本文整理汇总了C#中Reko.Core.Frame.EnsureStackArgument方法的典型用法代码示例。如果您正苦于以下问题:C# Frame.EnsureStackArgument方法的具体用法?C# Frame.EnsureStackArgument怎么用?C# Frame.EnsureStackArgument使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Reko.Core.Frame
的用法示例。
在下文中一共展示了Frame.EnsureStackArgument方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Setup
public void Setup()
{
f = new Frame(PrimitiveType.Word16);
argOff = f.EnsureStackArgument(4, PrimitiveType.Word16);
argSeg = f.EnsureStackArgument(6, PrimitiveType.SegmentSelector);
arg_alias = f.EnsureStackArgument(4, PrimitiveType.Pointer32);
}
示例2: Setup
public void Setup()
{
arch = new IntelArchitecture(ProcessorMode.Real);
f = new Frame(PrimitiveType.Word16);
argOff = f.EnsureStackArgument(4, PrimitiveType.Word16);
argSeg = f.EnsureStackArgument(6, PrimitiveType.SegmentSelector);
arg_alias = f.EnsureStackArgument(4, PrimitiveType.Pointer32);
}
示例3: Deserialize
public override FunctionType Deserialize(SerializedSignature ss, Frame frame)
{
int ncrn = 0;
int nsaa = 0;
// mem arg forb ret val
var argser = new ArgumentDeserializer(
this,
Architecture,
frame,
Architecture.PointerType.Size,
Architecture.WordWidth.Size);
Identifier ret = null;
if (ss.ReturnValue != null)
{
ret = argser.DeserializeReturnValue(ss.ReturnValue);
}
var args = new List<Identifier>();
if (ss.Arguments != null)
{
foreach (var sArg in ss.Arguments)
{
var dt = sArg.Type.Accept(TypeLoader);
var sizeInWords = (dt.Size + 3) / 4;
if (sizeInWords == 2 && (ncrn & 1) == 1)
++ncrn;
Identifier arg;
if (sizeInWords <= 4 - ncrn)
{
if (sizeInWords == 2)
{
arg = frame.EnsureSequence(
Architecture.GetRegister(argRegs[ncrn]),
Architecture.GetRegister(argRegs[ncrn + 1]),
dt);
ncrn += 2;
}
else
{
arg = frame.EnsureRegister(
Architecture.GetRegister(argRegs[ncrn]));
ncrn += 1;
}
}
else
{
arg = frame.EnsureStackArgument(nsaa, dt);
nsaa += AlignedStackArgumentSize(dt);
}
args.Add(arg);
}
}
return new FunctionType(ret, args.ToArray());
}