pub struct Teb {
pub index: &'static str,
pub array: &'static str,
pub block: &'static str,
}Expand description
The instructions a thread-local variable is reached with on Windows on AArch64.
The same walk as Indexed, from the TEB Windows keeps in x18 rather than in a segment,
and the six instructions clang writes for it.
adrp x8, _tls_index
ldr w8, [x8, :lo12:_tls_index]
ldr x9, [x18, #88]
ldr x8, [x9, x8, lsl #3]
add x8, x8, :secrel_hi12:x, lsl #12
add x0, x8, :secrel_lo12:xFields§
§index: &'static strThe first two, which read _tls_index, carrying it as its symbol.
array: &'static strThe third, which reads the array out of the TEB.
block: &'static strThe rest, which read this thread’s block out of the array with the index and add the variable’s offset in its section, carrying the variable as its symbol. It takes the array and the index as its two sources, in that order.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Teb
impl RefUnwindSafe for Teb
impl Send for Teb
impl Sync for Teb
impl Unpin for Teb
impl UnsafeUnpin for Teb
impl UnwindSafe for Teb
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