本文整理汇总了C#中Instruction.SIMM方法的典型用法代码示例。如果您正苦于以下问题:C# Instruction.SIMM方法的具体用法?C# Instruction.SIMM怎么用?C# Instruction.SIMM使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Instruction
的用法示例。
在下文中一共展示了Instruction.SIMM方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Stw_C
static List<CStatement> Stw_C(uint pc, uint instruction)
{
Instruction i = new Instruction(instruction);
CStatement stat = new CStatement(CStatement.Kinds.Assignment);
stat.OperandSizes = CStatement.Sizes.Int;
if (i.RS() == 0)
stat.Op2 = new CStatement.COperand(0);
else
stat.Op2 = new CStatement.COperand(RegName(i.RS()));
int ds = (int)i.SIMM();
if (i.RA() != 0)
stat.Op1 = new CStatement.COperand(RegName(i.RA()), ds);
else
{
stat.Op1 = new CStatement.COperand();
stat.Op1.Kind = CStatement.OperandKinds.AddressPointer;
stat.Op1.Offset = ds;
}
List<CStatement> stats = new List<CStatement>();
stats.Add(stat);
return stats;
}
示例2: Addi_C
static List<CStatement> Addi_C(uint pc, uint instruction)
{
Instruction i = new Instruction(instruction);
CStatement stat = new CStatement(CStatement.Kinds.Assignment, RegName(i.RD()));
if (i.RA() == 0)
stat.Op2 = new CStatement.COperand((ulong)(long)i.SIMM());
else if (i.SIMM() == 0)
stat.Op2 = new CStatement.COperand(RegName(i.RA()));
else
{
CStatement add = new CStatement(CStatement.Kinds.Addition, RegName(i.RA()), (ulong)(long)i.SIMM());
long val = (long)add.Op2.Value;
if (val < 0)
{
add.Kind = CStatement.Kinds.Subtraction;
add.Op2.Value = (ulong)-val;
}
stat.Op2 = new CStatement.COperand(add);
}
List<CStatement> stats = new List<CStatement>();
stats.Add(stat);
return stats;
}
示例3: Stwu_C
static List<CStatement> Stwu_C(uint pc, uint instruction)
{
Instruction i = new Instruction(instruction);
List<CStatement> stats = Stw_C(pc, instruction);
if (i.SIMM() == 0)
return stats;
CStatement add = new CStatement(CStatement.Kinds.Addition, RegName(i.RA()), (ulong)(long)i.SIMM());
CStatement stat = new CStatement(CStatement.Kinds.Assignment, RegName(i.RA()), add);
stat.OperandSizes = CStatement.Sizes.Int;
stats.Add(stat);
return stats;
}