Module ida_bitrange
bitrange_t(bit_ofs: uint16 = 0, size_in_bits: uint16 = 0)
: Proxy of C++ bitrange_t class.
Methods
apply_mask(self, subrange: bitrange_t) ‑> bool apply_mask(self, subrange) -> bool Apply mask to a bitrange
subrange: (C++: const bitrange_t &) range inside the main bitrange to keep After this operation the main bitrange will be truncated to have only the bits that are specified by subrange. Example: [off=8,nbits=4], subrange[off=1,nbits=2] => [off=9,nbits=2] return: success
bitoff(self) ‑> uint bitoff(self) -> uint Get offset of 1st bit.
bitsize(self) ‑> uint bitsize(self) -> uint Get size of the value in bits.
bytesize(self) ‑> uint bytesize(self) -> uint Size of the value in bytes.
compare(self, r: bitrange_t) ‑> int compare(self, r) -> int
r: bitrange_t const &
create_union(self, r: bitrange_t) ‑> void create_union(self, r) Create union of 2 ranges including the hole between them.
r: (C++: const bitrange_t &) bitrange_t const &
empty(self) ‑> bool empty(self) -> bool Is the bitrange empty?
extract(self, src: void const *, is_mf: bool) ‑> bool extract(self, src, is_mf) -> bool
src: void const * is_mf: bool
has_common(self, r: bitrange_t) ‑> bool has_common(self, r) -> bool Does have common bits with another bitrange?
r: (C++: const bitrange_t &) bitrange_t const &
init(self, bit_ofs: uint16, size_in_bits: uint16) ‑> void init(self, bit_ofs, size_in_bits) Initialize offset and size to given values.
bit_ofs: (C++: uint16) size_in_bits: (C++: uint16)
inject(self, dst: void *, src: bytevec_t const &, is_mf: bool) ‑> bool inject(self, dst, src, is_mf) -> bool
dst: void * src: bytevec_t const & is_mf: bool
intersect(self, r: bitrange_t) ‑> void intersect(self, r) Intersect two ranges.
r: (C++: const bitrange_t &) bitrange_t const &
mask64(self) ‑> uint64 mask64(self) -> uint64 Convert to mask of 64 bits.
reset(self) ‑> void reset(self) Make the bitrange empty.
shift_down(self, cnt: uint) ‑> void shift_down(self, cnt) Shift range down (left)
cnt: (C++: uint)
shift_up(self, cnt: uint) ‑> void shift_up(self, cnt) Shift range up (right)
cnt: (C++: uint)
sub(self, r: bitrange_t) ‑> bool sub(self, r) -> bool Subtract a bitrange.
r: (C++: const bitrange_t &) bitrange_t const &
Last updated