diff options
author | bd <bdunahu@operationnull.com> | 2025-05-10 15:07:58 -0400 |
---|---|---|
committer | bd <bdunahu@operationnull.com> | 2025-05-10 15:07:58 -0400 |
commit | a08582325ef39cb5dc1bbe14043b756b111899b1 (patch) | |
tree | 02e3dda533c610c693b3d037fe09ad4270df1f68 /tests/id.cc | |
parent | a29d974ac8cec5803dd9c9ea66f3ac5d06a1fe2b (diff) |
Fix tests to use correct register indexes with vector addition
Diffstat (limited to 'tests/id.cc')
-rw-r--r-- | tests/id.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/id.cc b/tests/id.cc index a81e967..ca10677 100644 --- a/tests/id.cc +++ b/tests/id.cc @@ -118,7 +118,7 @@ TEST_CASE_METHOD(IDFixture, "Parse arbitrary r-type # two", "[id]") signed int t; InstrDTO *i; - t = this->encode_R_type(0b10000, 0b01000, 0b00100, 0b10, 0b0); + t = this->encode_R_type(0b1000, 0b01000, 0b00100, 0b10, 0b0); i = this->decode_bits(t); CHECK(i->operands.integer.slot_one == 0x00000000); // registers are empty @@ -150,7 +150,7 @@ TEST_CASE_METHOD(IDFixture, "Parse arbitrary i-type # two", "[id]") signed int t; InstrDTO *i; - t = this->encode_I_type(0xCC, 0b101, 0b110, 0b1011, 0b1); + t = this->encode_I_type(0xCC, 0b10101, 0b00110, 0b11011, 0b1); i = this->decode_bits(t); CHECK(i->operands.integer.slot_one == 0x00000000); // registers are empty @@ -166,7 +166,7 @@ TEST_CASE_METHOD(IDFixture, "Parse arbitrary j-type # one", "[id]") signed int t; InstrDTO *i; - t = this->encode_J_type(0x3456, 0b10101, 0b0111, 0b10); + t = this->encode_J_type(0x3456, 0b101, 0b0111, 0b10); i = this->decode_bits(t); CHECK(i->operands.integer.slot_one == 0x00000000); // registers are empty @@ -181,7 +181,7 @@ TEST_CASE_METHOD(IDFixture, "Parse arbitrary j-type # two", "[id]") signed int t; InstrDTO *i; - t = this->encode_J_type(0xBBCCF, 0b10101, 0b0011, 0b10); + t = this->encode_J_type(0xBBCCF, 0b00101, 0b0011, 0b10); i = this->decode_bits(t); t = 0xFFFBBCCF; |