Exemple #1
0
 private void RewriteUnaryOp(UnaryOperator op)
 {
     var opDst = this.Operand(instr.Dst);
     var opSrc = this.Operand(instr.Src1);
     ConditionalAssign(opDst, new UnaryExpression(op,  PrimitiveType.Word32, opSrc));
     if (instr.OpFlags == OpFlags.S)
     {
         ConditionalAssign(frame.EnsureFlagGroup(0x1111, "SZCO", PrimitiveType.Byte), emitter.Cond(opDst));
     }
 }
Exemple #2
0
		private void RunApply(int a, UnaryOperator op, int expected)
		{
			Constant c1 = Constant.Word32(a);
			Constant c2 = op.ApplyConstant(c1);
			Assert.AreEqual(expected, (int) c2.ToInt64());
		}
Exemple #3
0
 private void RewriteUnaryOperator(UnaryOperator op, MachineOperand opDst, MachineOperand opSrc, CopyFlags flags)
 {
     EmitCopy(opDst, new UnaryExpression(op, opSrc.Width, SrcOp(opSrc)), flags);
 }