Skip to content

Commit

Permalink
detect: Support run-time detection on aarch64 NetBSD
Browse files Browse the repository at this point in the history
  • Loading branch information
taiki-e committed Mar 26, 2023
1 parent 68f93e1 commit 62db952
Show file tree
Hide file tree
Showing 10 changed files with 478 additions and 7 deletions.
11 changes: 11 additions & 0 deletions .github/.cspell/project-dictionary.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ alcgr
algr
armasm
armel
armreg
autogen
auxv
auxvec
Expand All @@ -20,6 +21,7 @@ cdsg
cfgs
cinc
cirruslabs
clidr
cmovae
cmovb
cmovge
Expand All @@ -32,6 +34,7 @@ cpsid
cpsie
CPSR
cpuid
cpus
crand
crandc
cror
Expand Down Expand Up @@ -76,16 +79,23 @@ memcpy
metavar
mfence
mgba
midr
miscompilation
mmfr
moreutils
mpidr
mstatus
mvfr
NCPU
NCPUONLINE
negs
neoverse
newrepo
newtype
nographic
nostdinc
NPROCESSORS
ONLN
opensbi
osfmk
osxsave
Expand All @@ -98,6 +108,7 @@ qword
RAII
rcpc
reentrancy
revidr
sbcs
seqlock
setb
Expand Down
2 changes: 1 addition & 1 deletion src/imp/atomic128/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Here is the table of targets that support run-time feature detection and the ins
| aarch64 | linux-gnu/android | getauxval |
| aarch64 | other linux | dlsym(getauxval) (via is_aarch64_feature_detected) |
| aarch64 | freebsd | elf_aux_info |
| aarch64 | macos/openbsd | sysctl |
| aarch64 | macos/netbsd/openbsd | sysctl |
| aarch64 | windows | IsProcessorFeaturePresent |
| aarch64 | fuchsia | zx_system_get_features |

Expand Down
4 changes: 3 additions & 1 deletion src/imp/atomic128/aarch64.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ include!("macros.rs");
#[path = "detect/aarch64_auxv.rs"]
mod detect;
#[cfg(not(portable_atomic_no_outline_atomics))]
#[cfg(target_os = "openbsd")]
#[cfg(any(target_os = "netbsd", target_os = "openbsd"))]
#[path = "detect/aarch64_aa64reg.rs"]
mod detect;
#[cfg(not(portable_atomic_no_outline_atomics))]
Expand Down Expand Up @@ -313,6 +313,7 @@ unsafe fn atomic_compare_exchange(
target_os = "linux",
target_os = "android",
target_os = "freebsd",
target_os = "netbsd",
target_os = "openbsd",
target_os = "fuchsia",
target_os = "windows",
Expand All @@ -328,6 +329,7 @@ unsafe fn atomic_compare_exchange(
target_os = "linux",
target_os = "android",
target_os = "freebsd",
target_os = "netbsd",
target_os = "openbsd",
target_os = "fuchsia",
target_os = "windows",
Expand Down
Loading

0 comments on commit 62db952

Please sign in to comment.