[decompiler] Add tests and fixes for vector-h and math (#333)

* before messing with ssa stuff

* fix ash

* bounding box
This commit is contained in:
water111
2021-03-24 19:16:31 -04:00
committed by GitHub
parent 0d8742241b
commit 99683c0dac
35 changed files with 2180 additions and 160 deletions
@@ -33,4 +33,15 @@ TEST(InstructionDecode, VSQRT) {
LinkedWord vdiv_word(vdiv_test);
auto instr = decode_instruction(vdiv_word, file, 0, 0);
EXPECT_EQ(instr.to_string({}), "vsqrt Q, vf20.z");
}
TEST(Instruction, IntelMaskMove) {
init_opcode_info();
LinkedObjectFile file;
u32 vmove_instr = 0b010010'1'1100'00001'00010'01100111100;
LinkedWord vmove_word(vmove_instr);
auto instr = decode_instruction(vmove_word, file, 0, 0);
EXPECT_EQ(instr.to_string({}), "vmove.xy vf1, vf2");
// this should be flipped from the PS2...
EXPECT_EQ(instr.cop2_dest_mask_intel(), 0b0011);
}