本文整理汇总了C#中Instruction.UIMM方法的典型用法代码示例。如果您正苦于以下问题:C# Instruction.UIMM方法的具体用法?C# Instruction.UIMM怎么用?C# Instruction.UIMM使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Instruction
的用法示例。
在下文中一共展示了Instruction.UIMM方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Ori_C
static List<CStatement> Ori_C(uint pc, uint instruction)
{
Instruction i = new Instruction(instruction);
/* NOP */
if (i.RA() == i.RS() && i.RS() == 0 && i.UIMM() == 0)
return new List<CStatement>();
CStatement stat;
if (i.RS() == 0)
stat = new CStatement(CStatement.Kinds.Assignment, RegName(i.RA()), i.UIMM());
else if (i.UIMM() == 0)
stat = new CStatement(CStatement.Kinds.Assignment, RegName(i.RA()), RegName(i.RS()));
else
{
CStatement or = new CStatement(CStatement.Kinds.Or, RegName(i.RS()), i.UIMM());
or.OperandSizes = CStatement.Sizes.Long;
stat = new CStatement(CStatement.Kinds.Assignment, RegName(i.RA()), or);
}
stat.OperandSizes = CStatement.Sizes.Long;
List<CStatement> stats = new List<CStatement>();
stats.Add(stat);
return stats;
}
示例2: Cmpli_C
static List<CStatement> Cmpli_C(uint pc, uint instruction)
{
Instruction i = new Instruction(instruction);
CStatement ass;
if (i.UIMM() != 0)
{
CStatement stat = new CStatement(CStatement.Kinds.Subtraction, RegName(i.RA()), (ulong)i.UIMM());
if (!i.CmpLong())
stat.OperandSizes = CStatement.Sizes.Int;
ass = new CStatement(CStatement.Kinds.Assignment, "cr" + i.CRFD(), stat);
}
else
ass = new CStatement(CStatement.Kinds.Assignment, "cr" + i.CRFD(), RegName(i.RA()));
if (!i.CmpLong())
ass.OperandSizes = CStatement.Sizes.Int;
List<CStatement> stats = new List<CStatement>();
stats.Add(ass);
return stats;
}