mirror of
https://github.com/open-goal/jak-project
synced 2026-08-21 23:00:45 -04:00
[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:
@@ -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);
|
||||
}
|
||||
Reference in New Issue
Block a user