Skip to content

Commit be284b6

Browse files
committed
add some comments to clarify the fix
1 parent c776fbf commit be284b6

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

library/std_detect/src/detect/os/linux/aarch64.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,12 @@ impl From<auxvec::AuxVec> for AtHwcap {
209209
wfxt: bit::test(auxv.hwcap2, 31),
210210
..Default::default()
211211
};
212+
213+
// Hardware capabilites from bits 32 to 63 should only
214+
// be tested on LP64 targets with 64 bits `usize`.
215+
// On ILP32 targets like `aarch64-unknown-linux-gun_ilp32`,
216+
// these hardware capabilites will default to `false`.
217+
// https://github.com/rust-lang/rust/issues/146230
212218
#[cfg(target_pointer_width = "64")]
213219
{
214220
// cap.ebf16: bit::test(auxv.hwcap2, 32);

0 commit comments

Comments
 (0)