pub enum LabelUse {
Branch14,
Branch19,
Branch26,
Ldr19,
Adr21,
PCRel32,
AdrpPage21,
AddLo12,
}arm64 only.Expand description
Different forms of label references for different instruction formats.
Variants§
Branch14
14-bit branch offset (conditional branches). PC-rel, offset is imm << 2. Immediate is 14 signed bits, in bits 18:5. Used by tbz and tbnz.
Branch19
19-bit branch offset (conditional branches). PC-rel, offset is imm << 2. Immediate is 19 signed bits, in bits 23:5. Used by cbz, cbnz, b.cond.
Branch26
26-bit branch offset (unconditional branches). PC-rel, offset is imm << 2. Immediate is 26 signed bits, in bits 25:0. Used by b, bl.
Ldr19
19-bit offset for LDR (load literal). PC-rel, offset is imm << 2. Immediate is 19 signed bits, in bits 23:5.
Adr21
21-bit offset for ADR (get address of label). PC-rel, offset is not shifted. Immediate is 21 signed bits, with high 19 bits in bits 23:5 and low 2 bits in bits 30:29.
PCRel32
32-bit PC relative constant offset (from address of constant itself), signed. Used in jump tables.
AdrpPage21
21-bit page offset for ADRP. The immediate is the signed difference
between the 4KiB page of the label and the 4KiB page of the ADRP
instruction, with high 19 bits in bits 23:5 and low 2 bits in bits
30:29. Equivalent to the R_AARCH64_ADR_PREL_PG_HI21 relocation.
AddLo12
Low 12 bits of the label’s address in the 12-bit immediate of an ADD
(immediate), bits 21:10. Equivalent to the R_AARCH64_ADD_ABS_LO12_NC
relocation. This has the same 4KiB-alignment requirement as
AdrpPage21, with which it is paired.
Trait Implementations§
impl Copy for LabelUse
impl Eq for LabelUse
impl StructuralPartialEq for LabelUse
Auto Trait Implementations§
impl Freeze for LabelUse
impl RefUnwindSafe for LabelUse
impl Send for LabelUse
impl Sync for LabelUse
impl Unpin for LabelUse
impl UnsafeUnpin for LabelUse
impl UnwindSafe for LabelUse
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.