diff options
author | Karel Kočí <cynerd@email.cz> | 2017-11-25 16:39:10 +0100 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2017-11-25 16:39:10 +0100 |
commit | 0d7da86ea5e5187dca2e843549c33f761e35f068 (patch) | |
tree | 5dd1df523fd7665a78532c52043dac7117cfb23d /qtmips_machine/tests/testalu.cpp | |
parent | 8f6d939e8d0fdec39c53da65cfb89f288d99eb82 (diff) | |
download | qtmips-0d7da86ea5e5187dca2e843549c33f761e35f068.tar.gz qtmips-0d7da86ea5e5187dca2e843549c33f761e35f068.tar.bz2 qtmips-0d7da86ea5e5187dca2e843549c33f761e35f068.zip |
Add crude implementation of MOV* instructions
I don't like how it's implemented but I have no other idea atm.
Diffstat (limited to 'qtmips_machine/tests/testalu.cpp')
-rw-r--r-- | qtmips_machine/tests/testalu.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/qtmips_machine/tests/testalu.cpp b/qtmips_machine/tests/testalu.cpp index b45a317..603a610 100644 --- a/qtmips_machine/tests/testalu.cpp +++ b/qtmips_machine/tests/testalu.cpp @@ -12,6 +12,20 @@ void MachineTests::alu_data() { QTest::addColumn<std::uint32_t>("res"); // TODO SLL-SRAV + QTest::newRow("MOVZ") << ALU_OP_MOVZ \ + << (std::uint32_t)22 \ + << (std::uint32_t)0 \ + << (std::uint8_t)0 \ + << Registers() \ + << Registers() \ + << (std::uint32_t)22; + QTest::newRow("MOVN") << ALU_OP_MOVN \ + << (std::uint32_t)22 \ + << (std::uint32_t)1 \ + << (std::uint8_t)0 \ + << Registers() \ + << Registers() \ + << (std::uint32_t)22; { Registers init; init.write_hi_lo(true, 42); |