mirror of
https://github.com/open-goal/jak-project
synced 2026-08-08 10:34:30 -04:00
decomp: generic (#611)
* decomp: Fix casting issue with uint64's from static data * decomp: `generic` * add forward declaration Co-authored-by: water111 <48171810+water111@users.noreply.github.com>
This commit is contained in:
@@ -642,8 +642,10 @@ Form* LoadVarOp::get_load_src(FormPool& pool, const Env& env) const {
|
||||
u64 value;
|
||||
memcpy(&value, &word0.data, 4);
|
||||
memcpy(((u8*)&value) + 4, &word1.data, 4);
|
||||
return pool.alloc_single_element_form<SimpleAtomElement>(
|
||||
nullptr, SimpleAtom::make_int_constant(value));
|
||||
return pool.alloc_single_element_form<CastElement>(
|
||||
nullptr, TypeSpec("uint"),
|
||||
pool.alloc_single_element_form<SimpleAtomElement>(
|
||||
nullptr, SimpleAtom::make_int_constant(value)));
|
||||
}
|
||||
|
||||
// is it a constant bitfield?
|
||||
@@ -797,4 +799,4 @@ FormElement* StackSpillStoreOp::get_as_form(FormPool& pool, const Env& env) cons
|
||||
|
||||
return pool.alloc_element<StackSpillStoreElement>(m_value, m_size, m_offset, cast_type);
|
||||
}
|
||||
} // namespace decompiler
|
||||
} // namespace decompiler
|
||||
|
||||
Reference in New Issue
Block a user