mirror of
https://github.com/open-goal/jak-project
synced 2026-09-03 02:14:07 -04:00
[decompiler] Update vector ops, reduce casts (#3849)
Update the decompiler to use the new vf macros. Also, fix a bunch of silly casting issues where accessing inline fields with an offset of 0 would be better than a cast:  --------- Co-authored-by: water111 <awaterford1111445@gmail.com>
This commit is contained in:
@@ -207,6 +207,13 @@ std::string OpenGOALAsm::full_function_name() {
|
||||
func_name = fmt::format(fmt::runtime(func_name), bc);
|
||||
}
|
||||
}
|
||||
|
||||
// Handle destination masks
|
||||
if (func.allows_modifier(MOD::DEST_MASK) && m_instr.cop2_dest != 0xff &&
|
||||
m_instr.cop2_dest != 15) {
|
||||
func_name += m_instr.cop2_dest_to_char();
|
||||
}
|
||||
|
||||
return func_name;
|
||||
}
|
||||
|
||||
@@ -270,13 +277,6 @@ std::vector<goos::Object> OpenGOALAsm::get_args(const std::vector<DecompilerLabe
|
||||
args.push_back(pretty_print::to_symbol("acc"));
|
||||
}
|
||||
|
||||
// Handle destination masks
|
||||
if (func.allows_modifier(MOD::DEST_MASK) && m_instr.cop2_dest != 0xff &&
|
||||
m_instr.cop2_dest != 15) {
|
||||
named_args.push_back(
|
||||
pretty_print::to_symbol(fmt::format(":mask #b{:b}", m_instr.cop2_dest_mask_intel())));
|
||||
}
|
||||
|
||||
// Some functions are configured, or its easiest to swap the source args
|
||||
// NOTE - this currently assumes it is the first two args that must be swapped
|
||||
if (func.allows_modifier(MOD::SWAP_FIRST_TWO_SOURCE_ARGS)) {
|
||||
|
||||
Reference in New Issue
Block a user