Byte cursor pulling opcodes sequentially across .ARM.extab words.
More...
#include <arm_extab_stream.hpp>
|
| constexpr | extab_byte_stream (address_space_ref space, uintptr_t extab_addr) noexcept |
| | Constructs a stream rooted at the first extab word.
|
| |
| constexpr bool | failed () const noexcept |
| | Reports whether the stream failed to parse a supported word-0 header (e.g. an out-of-line personality-routine pointer, which cannot be interpreted as bytecode).
|
| |
| bool | next_byte (uint8_t &out_byte) noexcept |
| | Pulls the next bytecode instruction byte across word boundaries.
|
| |
Byte cursor pulling opcodes sequentially across .ARM.extab words.
Per ARM EHABI ("Personality routine exception-handling table entries"), word 0's most-significant byte packs 1 <personality-index(3 bits)> <reserved(4 bits)>-like fields: bit 31 set marks an inline (rather than out-of-line personality-routine-pointer) table entry, and bits 27:24 select one of the three ABI personality routines, which in turn determines how many opcode bytes word 0 contributes and whether a word count follows:
- Personality 0 (
Su16, Short): word 0 = [1|idx=0][opcode][opcode] [opcode] – 3 opcode bytes, no extra-word count.
- Personality 1/2 (
Lu16/Lu32, Long): word 0 = [1|idx][N: extra word count][opcode][opcode] – only 2 opcode bytes from word 0, followed by N additional words each contributing 4 more opcode bytes (MSB first).
◆ extab_byte_stream()
| constexpr microfmt::extab_byte_stream::extab_byte_stream |
( |
address_space_ref |
space, |
|
|
uintptr_t |
extab_addr |
|
) |
| |
|
inlineconstexprnoexcept |
Constructs a stream rooted at the first extab word.
- Parameters
-
| space | Address space to read from. |
| extab_addr | Address of the .ARM.extab entry. |
◆ failed()
| constexpr bool microfmt::extab_byte_stream::failed |
( |
| ) |
const |
|
inlineconstexprnoexcept |
Reports whether the stream failed to parse a supported word-0 header (e.g. an out-of-line personality-routine pointer, which cannot be interpreted as bytecode).
◆ next_byte()
| bool microfmt::extab_byte_stream::next_byte |
( |
uint8_t & |
out_byte | ) |
|
|
inlinenoexcept |
Pulls the next bytecode instruction byte across word boundaries.
- Parameters
-
| out_byte | Receives the next opcode byte. |
- Returns
true when a byte was produced, false at end of stream or on a read failure.
The documentation for this class was generated from the following file: