15 std::span<const std::uint16_t>
code,
17 if (
const std::size_t words = leaving ? 6 : 4;
19 (
code[1] & 0xf800) != 0xf000 || (
code[2] & 0xf801) != 0xe800 ||
20 code[words - 1] != 0xbd10) {
24 ((
code[3] & 0xf800) != 0xf000 || (
code[4] & 0xf800) != 0xf800)) {
27 const std::uint32_t
raw =
28 ((
code[1] & 0x7ffu) << 12) | ((
code[2] & 0x7ffu) << 1);
29 const std::int64_t displacement =
30 (
raw & 0x400000u) ? std::int64_t{
raw} - 0x800000 : std::int64_t{
raw};
31 const std::int64_t
target =
32 static_cast<std::int64_t
>(((
address &
~std::uintptr_t{1}) + 6) &
35 if (target <= 0 || target > UINT32_MAX || (
target & 3) != 0) {
38 return static_cast<std::uintptr_t
>(
target);