Skip to main content

Crate exarmo_aarch64_capi

Crate exarmo_aarch64_capi 

Source
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::operands laid out as include/exarmo/aarch64.h declares 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_instruction in C.
FlagEffect
What an instruction does with the condition flags, as C holds it.
Str
A string that is not NUL-terminated.
TextSize
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 len bytes at bytes into out, which is written only on Status::Ok.
exarmo_aarch64_decode_word⚠
Decode bits into out, which is written only on Status::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_COUNT for 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_COUNT for 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 to capacity of 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_COUNT for a null pointer.
exarmo_aarch64_instruction_operands⚠
Write the instruction’s operands into out, up to capacity. 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 inst was 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 id names into out. Returns false, leaving out untouched, if id names none.
exarmo_aarch64_intrinsic_type_at⚠
Write what the C type ty is into out. Returns false, leaving out untouched, if ty is 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.