public void Add_S_D([ValueSource("_1D_")][Random(1)] ulong A, [ValueSource("_1D_")][Random(1)] ulong B) { uint Opcode = 0x5EE28420; // ADD D0, D1, D2 Bits Op = new Bits(Opcode); AVec V0 = new AVec { X1 = TestContext.CurrentContext.Random.NextULong() }; AVec V1 = new AVec { X0 = A }; AVec V2 = new AVec { X0 = B }; AThreadState ThreadState = SingleOpcode(Opcode, V0: V0, V1: V1, V2: V2); AArch64.V(1, new Bits(A)); AArch64.V(2, new Bits(B)); SimdFp.Add_S(Op[23, 22], Op[20, 16], Op[9, 5], Op[4, 0]); Assert.Multiple(() => { Assert.That(ThreadState.V0.X0, Is.EqualTo(AArch64.V(64, 0).ToUInt64())); Assert.That(ThreadState.V0.X1, Is.Zero); }); }
public void Abs_S_D([ValueSource("_1D_")][Random(1)] ulong A) { uint Opcode = 0x5EE0B820; // ABS D0, D1 Bits Op = new Bits(Opcode); Vector128 <float> V0 = MakeVectorE1(TestContext.CurrentContext.Random.NextULong()); Vector128 <float> V1 = MakeVectorE0(A); AThreadState ThreadState = SingleOpcode(Opcode, V0: V0, V1: V1); AArch64.V(1, new Bits(A)); SimdFp.Abs_S(Op[23, 22], Op[9, 5], Op[4, 0]); Assert.Multiple(() => { Assert.That(GetVectorE0(ThreadState.V0), Is.EqualTo(AArch64.V(64, 0).ToUInt64())); Assert.That(GetVectorE1(ThreadState.V0), Is.Zero); }); }
public void Abs_S_D([ValueSource("_D_")][Random(1)] ulong A) { uint Opcode = 0x5EE0B820; // ABS D0, D1 Bits Op = new Bits(Opcode); AVec V0 = new AVec { X1 = TestContext.CurrentContext.Random.NextULong() }; AVec V1 = new AVec { X0 = A }; AThreadState ThreadState = SingleOpcode(Opcode, V0: V0, V1: V1); AArch64.V(1, new Bits(A)); SimdFp.Abs_S(Op[23, 22], Op[9, 5], Op[4, 0]); Assert.That(ThreadState.V0.X0, Is.EqualTo(AArch64.V(64, 0).ToUInt64())); Assert.That(ThreadState.V0.X1, Is.Zero); }