Expand description
The C face of the exarmo-aarch64 disassembler, declared in
include/exarmo/aarch64.h.
An instruction is decoded once into an opaque value the caller holds,
and then read through functions: what it is, what it does to the flags,
its operands as include/exarmo/aarch64.h lays them out, and its text as spans
of a buffer the caller owns. Nothing allocates on the caller’s behalf,
and no panic crosses the boundary. Each entry point catches one and
reports a failure.
Modules§
- model
- Each type of
exarmo_aarch64::operandslaid out asinclude/exarmo/aarch64.hdeclares it, and the conversion from the Rust one. The header is the authority on layout, and every struct here follows its field order. - tables
- The tables the architecture fixes, laid out for C to read directly.
Structs§
- Branch
- What an instruction does to the flow of control, as C holds it.
- CInstruction
- Opaque storage for an
Instruction,exarmo_aarch64_instructionin C. - Flag
Effect - What an instruction does with the condition flags, as C holds it.
- Str
- A string that is not NUL-terminated.
- Text
Size - How much text and how many tokens an instruction has.
- Token
- One token of an instruction’s text, a span of the text buffer it was written into.
Enums§
- Status
- The outcome of a decode,
<prefix>_status.
Functions§
- exarmo_
aarch64_ ⚠decode - The former name of
exarmo_aarch64_decode_word, which the header marks deprecated. - exarmo_
aarch64_ ⚠decode_ bytes - Decode the instruction at the start of the
lenbytes atbytesintoout, which is written only onStatus::Ok. - exarmo_
aarch64_ ⚠decode_ word - Decode
bitsintoout, which is written only onStatus::Ok. - exarmo_
aarch64_ encoding_ length - How many bytes an encoding is, or 0 for a value that is no encoding.
- exarmo_
aarch64_ encoding_ mnemonic - The mnemonic an encoding is written with. Returns
EXARMO_AARCH64_MNEMONIC_COUNTfor a value that is no encoding. - exarmo_
aarch64_ encoding_ name - An encoding’s name, or empty for a value that is no encoding.
- exarmo_
aarch64_ ⚠instruction_ branch - What the instruction does to the flow of control, as it reads at
address. Nothing for a null pointer. - exarmo_
aarch64_ ⚠instruction_ encoding - Which encoding the instruction is. Returns
EXARMO_AARCH64_ENCODING_COUNTfor a null pointer. - exarmo_
aarch64_ ⚠instruction_ flags - What the instruction does with the condition flags. Nothing for a null pointer.
- exarmo_
aarch64_ ⚠instruction_ intrinsics - Write the ACLE intrinsics the instruction realises into
out, up tocapacityof them. Returns how many it has. - exarmo_
aarch64_ ⚠instruction_ length - How many bytes of the instruction stream the instruction is, or 0 for a null pointer.
- exarmo_
aarch64_ ⚠instruction_ mnemonic - The mnemonic the instruction is written with. Returns
EXARMO_AARCH64_MNEMONIC_COUNTfor a null pointer. - exarmo_
aarch64_ ⚠instruction_ operands - Write the instruction’s operands into
out, up tocapacity. Returns how many the instruction has. - exarmo_
aarch64_ instruction_ size - How many bytes of storage a decode writes, as the library was built.
- exarmo_
aarch64_ ⚠instruction_ text - Write the instruction’s text into the caller’s buffer. Returns the length of the whole text.
- exarmo_
aarch64_ ⚠instruction_ tokens - Write the instruction’s text and tokens into the caller’s buffers.
- exarmo_
aarch64_ ⚠instruction_ unpredictable - Whether the word
instwas decoded from is CONSTRAINED UNPREDICTABLE, through its decode’s tests or a bit its diagram writes(0)or(1). Returns false for a null pointer. - exarmo_
aarch64_ ⚠intrinsic_ at - Write the intrinsic
idnames intoout. Returns false, leavingoutuntouched, ifidnames none. - exarmo_
aarch64_ ⚠intrinsic_ type_ at - Write what the C type
tyis intoout. Returns false, leavingoutuntouched, iftyis not one. - exarmo_
aarch64_ mnemonic_ name - A mnemonic’s text, or empty for a value that is no mnemonic.
- exarmo_
aarch64_ ⚠sysreg_ name - Write a system register’s name into the caller’s buffer. Returns the length of the whole name.