#[non_exhaustive]pub enum AssembleError {
Encode(EncodeError),
BufferOverflow {
needed: usize,
remaining: usize,
},
PositionOutOfBounds {
position: usize,
len: usize,
},
WriteOutOfBounds {
at: usize,
len: usize,
},
ReadOutOfBounds {
at: usize,
len: usize,
},
RawBytesNotWordAligned {
len: usize,
},
UnboundLocalLabel,
RelocationOutOfRange {
kind: BranchRelocKind,
from: usize,
to: usize,
value: i64,
bits: u8,
},
MovPseudoInvalidDestination {
class: RegClass,
},
MovPseudoImmediateOutOfRange {
class: RegClass,
value: i64,
},
}Expand description
Emission errors for writing encoded instructions into a caller-provided word buffer.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Encode(EncodeError)
Encoding failed.
BufferOverflow
Output buffer does not have enough free words.
Fields
PositionOutOfBounds
Position update would move outside current emitted range.
WriteOutOfBounds
In-place write would exceed current emitted range.
ReadOutOfBounds
In-place read would exceed current emitted range.
RawBytesNotWordAligned
Raw byte directive payload is not aligned to full instruction words.
UnboundLocalLabel
JIT block contains an unresolved local label.
RelocationOutOfRange
Relocation value exceeds the supported signed field width.
Fields
§
kind: BranchRelocKindRelocation kind.
MovPseudoInvalidDestination
MOV pseudo destination is not a general-purpose data register (Wn/Xn).
MovPseudoImmediateOutOfRange
MOV Wn, #imm immediate does not fit 32-bit materialization range.
Trait Implementations§
Source§impl Clone for AssembleError
impl Clone for AssembleError
Source§fn clone(&self) -> AssembleError
fn clone(&self) -> AssembleError
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AssembleError
impl Debug for AssembleError
Source§impl Display for AssembleError
impl Display for AssembleError
Source§impl From<AssembleError> for LinkPatchError
impl From<AssembleError> for LinkPatchError
Source§fn from(value: AssembleError) -> Self
fn from(value: AssembleError) -> Self
Converts to this type from the input type.
Source§impl From<EncodeError> for AssembleError
impl From<EncodeError> for AssembleError
Source§fn from(value: EncodeError) -> Self
fn from(value: EncodeError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for AssembleError
impl PartialEq for AssembleError
impl Eq for AssembleError
impl StructuralPartialEq for AssembleError
Auto Trait Implementations§
impl Freeze for AssembleError
impl RefUnwindSafe for AssembleError
impl Send for AssembleError
impl Sync for AssembleError
impl Unpin for AssembleError
impl UnsafeUnpin for AssembleError
impl UnwindSafe for AssembleError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more