MCPcopy Create free account
hub / github.com/RustCrypto/utils / get_dit_enabled

Function get_dit_enabled

dit/src/lib.rs:101–111  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

99#[cfg(target_arch = "aarch64")]
100#[target_feature(enable = "dit")]
101unsafe fn get_dit_enabled() -> bool {
102 let mut dit: u64;
103 unsafe {
104 asm!(
105 "mrs {dit}, DIT",
106 dit = out(reg) dit,
107 options(nomem, nostack, preserves_flags)
108 );
109 }
110 (dit >> 24) & 1 != 0
111}
112
113/// Enable DIT for the current thread.
114///

Callers 3

is_enabledMethod · 0.85
set_dit_enabledFunction · 0.85
asm_wrappersFunction · 0.85

Calls

no outgoing calls

Tested by 1

asm_wrappersFunction · 0.68