[Decompile] pad and gs (#389)

* update stuff

* gs reference added

* update config
This commit is contained in:
water111
2021-04-26 21:40:08 -04:00
committed by GitHub
parent 8619e6df19
commit 3d2ca71fe3
40 changed files with 3716 additions and 1542 deletions
+4 -1
View File
@@ -636,7 +636,10 @@ Form* LoadVarOp::get_load_src(FormPool& pool, const Env& env) const {
// smaller. We should check that the higher bits are all zero.
int bits = as_bitfield->get_size_in_memory() * 8;
assert(bits <= 64);
assert((value >> bits) == 0);
if (bits < 64) {
assert((value >> bits) == 0);
// technically ub if bits == 64.
}
TypeSpec typespec(hint->second.type_name);
auto defs = decompile_bitfield_from_int(typespec, ts, value);
return pool.alloc_single_element_form<BitfieldStaticDefElement>(nullptr, typespec, defs,