public void ArithmeticTest()
{
CpuThreadState.GPR[1] = -1;
CpuThreadState.GPR[2] = -1;
CpuThreadState.GPR[3] = -1;
CpuThreadState.GPR[4] = -1;
CpuThreadState.GPR[11] = 11;
CpuThreadState.GPR[12] = 12;
ExecuteAssembly(@"
add r1, r0, r11
add r2, r0, r12
sub r3, r2, r1
addi r4, r0, 1234
");
Assert.AreEqual(11, CpuThreadState.GPR[1]);
Assert.AreEqual(12, CpuThreadState.GPR[2]);
Assert.AreEqual(1, CpuThreadState.GPR[3]);
Assert.AreEqual(1234, CpuThreadState.GPR[4]);
}