diff --git a/decompiler/IR2/bitfields.cpp b/decompiler/IR2/bitfields.cpp index 514d40a4a..6459f81c1 100644 --- a/decompiler/IR2/bitfields.cpp +++ b/decompiler/IR2/bitfields.cpp @@ -581,6 +581,19 @@ std::optional get_goal_integer_constant(Form* in, const Env&) { return result; } } + + // also (shl 16) + matcher = Matcher::op(GenericOpMatcher::fixed(FixedOperatorKind::SHL), + {Matcher::any(1), Matcher::integer(16)}); + mr = match(matcher, in); + if (mr.matched) { + auto arg_as_atom = form_as_atom(mr.maps.forms.at(1)); + if (arg_as_atom && arg_as_atom->is_int()) { + u64 result = arg_as_atom->get_int(); + result <<= 16ull; + return result; + } + } return {}; }