pub struct Indexed {
pub index: &'static str,
pub load: &'static str,
pub segment: Segment,
pub at: i32,
pub add: &'static str,
}Expand description
The instructions a thread-local variable is reached with on Windows.
Every thread keeps an array of pointers, one for each image’s copy of its .tls section. The
thread block holds the array, the image’s _tls_index says which slot is its own, and the
variable is as far into the copy as it is into the section.
movl _tls_index(%rip), %idx
movq %gs:88, %arr
movq (%arr,%idx,8), %blk
leaq x@SECREL32(%blk), %xFields§
§index: &'static strA 32-bit load, zero extended, which reads _tls_index.
load: &'static strA load of a whole word, which reads the array out of the thread block and the block out of the array.
segment: SegmentThe segment the thread block is in, and how far into it the array is.
at: i32The same.
add: &'static strThe instruction that adds an offset to a register, which takes the variable’s offset in its section as its displacement.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Indexed
impl RefUnwindSafe for Indexed
impl Send for Indexed
impl Sync for Indexed
impl Unpin for Indexed
impl UnsafeUnpin for Indexed
impl UnwindSafe for Indexed
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