Module aarch64

Source
Expand description

Runtime support for the aarch64 architecture assembling target.

The aarch64 instruction set features fixed-width 32-bit instructions and relative relocations up to 28 bits in size.

The core relocation behaviour for this architecture is provided by the Aarch64Relocation type.

Next to that, this module contains the following:

§Type aliases

Several specialized type aliases of the generic Assembler are provided as these are by far the most common usecase.

§Enums

There are enumerations of every logically distinct register family usable in aarch64. These enums implement the Register trait and their discriminant values match their numeric encoding in dynamic register literals.

Note: The presence of some registers listed here is purely what is encodable. Check the relevant architecture documentation to find what is architecturally valid.

§Functions

The aarch64 architecture allows encoding several special types of immediates. The encoding implementations for these immediate types have been exposed to assist the user in correctly using these instructions. They will return Some(encoding) only if the given value can be encoded losslessly in that immediate type.

Enums§

Aarch64Relocation
Relocation implementation for the aarch64 architecture.
RV
1, 2, 4, 8 or 16-bytes scalar FP / vector SIMD registers.
RX
4 or 8-byte general purpopse registers, where X31 is the zero register.
RXSP
0x1F addresses both XZR and SP (disambiguated by context). This enum is a mirror of RX just with the SP in place of XZR.

Functions§

encode_floating_point_immediate
Helper function for validating that a given value can be encoded as a floating point immediate
encode_logical_immediate_32bit
Helper function for validating that a given value can be encoded as a 32-bit logical immediate
encode_logical_immediate_64bit
Helper function for validating that a given value can be encoded as a 64-bit logical immediate
immediate_out_of_range_signed_32
Handler for i32 out-of-range aarch64 immediates.
immediate_out_of_range_unsigned_32
Handler for u32 out-of-range aarch64 immediates.
immediate_out_of_range_unsigned_64
Handler for u64 out-of-range aarch64 immediates.
immediate_out_of_range_unsigned_f32
Handler for f32 out-of-range aarch64 immediates.

Type Aliases§

Assembler
An aarch64 Assembler. This is aliased here for backwards compatability.
AssemblyModifier
An aarch64 AssemblyModifier. This is aliased here for backwards compatability.
UncommittedModifier
An aarch64 UncommittedModifier. This is aliased here for backwards compatability.