Skip to content

Turn stdarch into a Josh subtree #141899

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2,397 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
2397 commits
Select commit Hold shift + click to select a range
1fab09a
use `simd_ctlz` instead of an extern
folkertdev Feb 13, 2025
2dbc1e9
use `simd_shuffle` in the implementation of `vec_splat`
folkertdev Feb 22, 2025
b75bc77
use `simd_neg` in the `impl crate::ops::Neg`
folkertdev Feb 22, 2025
cefc61d
implement `vec_round` and friends
folkertdev Jan 22, 2025
bed1521
impl `VectorMax/Min` for `vector_float/double`
folkertdev Jan 22, 2025
3e3c523
simplify the `vec_abs` implementation
folkertdev Jan 22, 2025
d845304
use generic llvm intrinsics for rounding
folkertdev Feb 13, 2025
055daf7
start using the newly added target features for testing
folkertdev Feb 22, 2025
3ac35a7
mark riscv intrinsics as safe
usamoi Feb 15, 2025
67468b2
add newly-added s390x features to `is_s390x_feature_detected`
folkertdev Feb 22, 2025
f64b610
Update generator to facilitate big endian
Jamesbarford Jan 31, 2025
3b93df8
Update YAML & generated files
Jamesbarford Jan 31, 2025
d120278
Remove hand crafted intrinsics that are now generated
Jamesbarford Jan 31, 2025
7294081
Update test runner to support big endian
Jamesbarford Jan 31, 2025
95d5d61
Update CI to facilitate big endian at some point
Jamesbarford Jan 31, 2025
f4974ae
ensure correct linker gets chosen
Jamesbarford Feb 4, 2025
443d1cd
fix non-working intrinsics
Jamesbarford Feb 11, 2025
bec322f
fix test runner for armv7
Jamesbarford Feb 11, 2025
2ab4624
remove print statment and correct target name
Jamesbarford Feb 11, 2025
b95fc44
fix up yaml & re-generate
Jamesbarford Feb 11, 2025
5c10dc3
update clang to clang-19
Jamesbarford Feb 11, 2025
1d166d4
tidy up proposed Dockerfile & run.sh
Jamesbarford Feb 17, 2025
014fe0b
fix - only use simd_shuffle! on intrinsics that require it
Jamesbarford Feb 18, 2025
e2ce7e1
intrinsics_data: Add Neon fp16 intrinsics to arm_intrinsics.json
mrkajetanp Jan 7, 2025
78e6b3e
stdarch-verify: Support f16 vector types
mrkajetanp Jan 30, 2025
ed7bf87
intrinsic-test: Support testing f16 intrinsics
mrkajetanp Jan 30, 2025
7cdc915
core-arch: Add Arm f16 vector types
mrkajetanp Jan 30, 2025
f4a31fd
core-arch: Add NEON fp16 intrinsics
mrkajetanp Jan 30, 2025
3b58340
intrinsic-test: Print C++ float16_t in hex
mrkajetanp Feb 5, 2025
74ff875
mark SSE SIMD intrinsics as safe
usamoi Jan 26, 2025
f6a4a09
mark SSE2 SIMD intrinsics as safe
usamoi Jan 26, 2025
4836ce5
mark SSE3 SIMD intrinsics as safe
usamoi Jan 26, 2025
e801fc4
mark SSSE3 intrinsics as safe
usamoi Jan 26, 2025
d12cfd7
mark SSE4.1 intrinsics as safe
usamoi Jan 26, 2025
caafa82
mark SSE4.2 intrinsics as safe
usamoi Jan 26, 2025
0db395e
mark SSE4a intrinsics as safe
usamoi Jan 26, 2025
1271b7e
mark POPCNT intrinsics as safe
usamoi Jan 26, 2025
9913eb5
mark LZCNT intrinsics as safe
usamoi Jan 26, 2025
cfbeb3b
mark BMI1 intrinsics as safe
usamoi Jan 26, 2025
a355388
mark BMI2 intrinsics as safe
usamoi Jan 26, 2025
7cc2822
mark AVX intrinsics as safe
usamoi Jan 26, 2025
093f6a3
mark F16C intrinsics as safe
usamoi Jan 26, 2025
4ca81c0
mark FMA intrinsics as safe
usamoi Jan 26, 2025
40e14c8
mark AVX2 intrinsics as safe
usamoi Jan 26, 2025
318a69a
mark SHA intrinsics as safe
usamoi Jan 26, 2025
14b0bfb
mark AES intrinsics as safe
usamoi Jan 26, 2025
2348f15
mark PCLMULQDQ intrinsics as safe
usamoi Jan 26, 2025
f53c07b
mark AVX512 & AVXNECONVERT intrinsics as safe
usamoi Jan 27, 2025
e596997
fix doctest for __m128d
usamoi Feb 14, 2025
8ba3a7e
wasm: use `simd_as` for float to integer conversions
folkertdev Feb 24, 2025
d388087
nvptx: use `simd_fmin` and `simd_fmax` for `minnum` and `maxnum`
folkertdev Feb 24, 2025
d0bc126
powerpc: use `simd_ceil` and `simd_floor`
folkertdev Feb 24, 2025
b8d25bd
Remove some `allow(unsafe_op_in_unsafe_fn)`s and use target_feature 1…
eduardosm Feb 24, 2025
e18318c
replaced extern "rust-intrinsic" block with core::ptr::copy_nonoverl…
BLANKatGITHUB Feb 23, 2025
fc83e49
fix - neon type signed unsigned conversions
Jamesbarford Feb 25, 2025
25b17cf
Update simd128.rs
TDecking Feb 26, 2025
bcf796a
mark arm intrinsics as safe
usamoi Feb 25, 2025
4efb6d5
Fix doctests failing due to unused_unsafe
ehuss Feb 27, 2025
6c0068d
fix compilation on armebv7r-none-eabi
usamoi Mar 1, 2025
6a30c93
wasm: update for rintf intrinsic rename
RalfJung Feb 23, 2025
aa4ce89
use the `simd_fma` intrinsic for `vec_madd`
folkertdev Mar 1, 2025
a820461
powerpc: use `llvm.fshl` for `vec_rl`
folkertdev Mar 2, 2025
ef68d2f
implement the long bitshifts
folkertdev Feb 17, 2025
b1d20cb
implement standard bitshifts
folkertdev Feb 17, 2025
81be4a2
implement rotate left
folkertdev Feb 19, 2025
c9a9385
add vector shift by byte
folkertdev Feb 19, 2025
dc0a5c8
add `vec_rli`
folkertdev Feb 19, 2025
4341a8b
add `vec_rl_mask`
folkertdev Feb 19, 2025
7cc682d
add `vec_reve`
folkertdev Feb 19, 2025
fb05c53
add `vec_revb`
folkertdev Feb 19, 2025
24ef1ac
add `vec_mergel` and `vec_mergeh`
folkertdev Feb 19, 2025
1766b7c
pull out `ShuffleMask`
folkertdev Feb 20, 2025
33f1f20
add `vec_genmask` and `vec_genmasks`
folkertdev Feb 20, 2025
5d20f31
add `vec_perm`
folkertdev Feb 21, 2025
a956edc
add `vec_sum2`, `vec_sum4` and `vec_sum_u128`
folkertdev Feb 21, 2025
b84a33d
add `vec_subc_u128`, `vec_sube_u128`, `vec_subec_u128`, `vec_sub_u128`
folkertdev Feb 21, 2025
4c48771
add `vec_nabs`
folkertdev Feb 22, 2025
08215ac
add `vec_sqrt`
folkertdev Feb 22, 2025
914cd5a
add `vec_splat` and friends
folkertdev Feb 22, 2025
79b89a0
add `vec_find_any_eq` and `vec_find_any_ne`
folkertdev Feb 23, 2025
b7bcdcb
add `vec_find_any_eq_idx` and `vec_find_any_ne_idx`
folkertdev Feb 23, 2025
15def15
add `vec_find_any_eq_cc` and `vec_find_any_ne_cc`
folkertdev Feb 23, 2025
fcf6612
add `vec_find_any_eq_or_0_idx` and `vec_find_any_ne_or_0_idx`
folkertdev Feb 23, 2025
5b0c5d2
add `vec_find_any_eq_or_0_idx_cc` and `vec_find_any_ne_or_0_idx_cc`
folkertdev Feb 23, 2025
f5a577c
make _mm256_zero{upper,all} safe
RalfJung Mar 3, 2025
694214b
fix unnecessary unsafe error in doctest
RalfJung Mar 4, 2025
1088aae
feat - FEAT_FAMINMAX neon intrinsics
Jamesbarford Jan 22, 2025
de7f56f
Add aarch64_unstable_target_feature and relax instruction assertion
Jamesbarford Feb 24, 2025
24555b5
Add faminmax intrinsics to the skip list
Jamesbarford Feb 24, 2025
5ece6ac
armV7 does not need faminmax flag
Jamesbarford Feb 24, 2025
61b9f9f
mark FEAT_FAMINMAX intrinsics as safe
Jamesbarford Feb 28, 2025
520dfd5
add unstable for faminmax
Jamesbarford Mar 3, 2025
89c9c8b
feat - FEAT_LUT neon instrinsics
Jamesbarford Mar 3, 2025
9405357
Don't field-project (`.0`) into SIMD types
scottmcm Mar 5, 2025
ec55ab6
Update SDE mirror to ci-mirrors.rust-lang.org
sayantn Mar 15, 2025
ab098c6
wasm32: Fix undefined behavior with shift intrinsics
alexcrichton Mar 3, 2025
28580ed
Fix rustfmt
alexcrichton Mar 3, 2025
267558c
Document safety conditions of simd shifts
alexcrichton Mar 10, 2025
e4d3364
add `vec_reve`
folkertdev Feb 19, 2025
3813933
add `vec_xl` and `vec_xst`
folkertdev Feb 25, 2025
6761c73
add `vec_load_len` and `vec_store_len`
folkertdev Feb 25, 2025
5092b69
add `vec_load_len_r` and `vec_store_len_r`
folkertdev Feb 25, 2025
6abac3c
add `vec_load_bndry`, `__lcbb` and `vec_load_pair`
folkertdev Feb 25, 2025
34629d4
add `vec_pack`, `vec_packs` and `vec_packsu`
folkertdev Mar 1, 2025
3a0ba7f
add `vec_packs_cc` and `vec_packsu_cc`
folkertdev Mar 1, 2025
0b0f519
add `vec_madd` and `vec_msub`
folkertdev Mar 1, 2025
167b13e
test `vec_rl`
folkertdev Mar 2, 2025
08735d3
correct name of signed splat functions
folkertdev Mar 3, 2025
37706d1
add `vec_unpackh` and `vec_unpackl`
folkertdev Mar 3, 2025
8a7d50a
add `vec_avg`
folkertdev Mar 3, 2025
f9750fb
add `vec_checksum`
folkertdev Mar 3, 2025
ea91fd9
add `vec_add_u128`, `vec_addc_u128`, `vec_adde_u128` and `vec_addce_u…
folkertdev Mar 4, 2025
baec44b
add `vec_mule`
folkertdev Mar 4, 2025
01182e5
add `vec_nmsub`
folkertdev Mar 4, 2025
7ea1b87
clarify fixme waiting for a newer llvm version
folkertdev Mar 4, 2025
d10f272
add `vec_gfmsum`
folkertdev Mar 4, 2025
2207ace
add `vec_gfmsum_128`
folkertdev Mar 4, 2025
f44b184
add `vec_gfmsum_accum` and `vec_gfmsum_accum_128`
folkertdev Mar 4, 2025
ac7e696
add `vec_nmadd`
folkertdev Mar 4, 2025
9815ca6
add `vec_gather_element`
folkertdev Mar 4, 2025
57f9b31
add `vec_bperm_u128`
folkertdev Mar 4, 2025
8ad4a91
add `vec_sel`
folkertdev Mar 4, 2025
45767c7
add `vec_scatter`
folkertdev Mar 4, 2025
9dcbd2f
add `vec_fp_test_data_class`
folkertdev Mar 5, 2025
2ba9c9c
add `vec_test_mask`
folkertdev Mar 5, 2025
d4c98b0
add `vec_search_string_cc` and `vec_search_string_until_zero_cc`
folkertdev Mar 5, 2025
68b9d71
add `vec_double` and `vec_float`
folkertdev Mar 5, 2025
c29266a
add `vec_extend_s64`
folkertdev Mar 5, 2025
efe09e0
add `vec_signed` and `vec_unsigned`
folkertdev Mar 5, 2025
0c01143
add `vec_cp_until_zero` and `vec_cp_until_zero_cc`
folkertdev Mar 5, 2025
239f240
add `vec_msum_u128`
folkertdev Mar 5, 2025
b4b126e
add `vec_sld`, `vec_sldb`, `vec_sldw` and `vec_srdb`
folkertdev Mar 5, 2025
edbeee5
add `vec_cmprg`
folkertdev Mar 6, 2025
511a8eb
add `vec_cmpnrg`
folkertdev Mar 6, 2025
895d11f
add `vec_cmprg_idx` and `vec_cmpnrg_idx`
folkertdev Mar 6, 2025
3660dff
add `vec_cmprg_cc` and friends
folkertdev Mar 6, 2025
790d77e
add `vec_cmprg_or_0_idx` and `vec_cmpnrg_or_0_idx`
folkertdev Mar 6, 2025
d218bd1
add `vec_cmprg_or_0_idx_cc` and `vec_cmpnrg_or_0_idx_cc`
folkertdev Mar 6, 2025
81a2841
let's not use `&mut` until we get confirmation it's OK
folkertdev Mar 6, 2025
8affaab
add `vec_cmpgt`, `vec_cmplt`, `vec_cmpge`, `vec_cmple`
folkertdev Mar 7, 2025
b866e43
add `vec_cmpeq` and `vec_cmpne`
folkertdev Mar 7, 2025
2667fd0
add `vec_cmpeq_idx` and variations
folkertdev Mar 7, 2025
e309059
add `vec_all_nan`, `vec_any_nan`, `vec_all_numeric` and `vec_any_nume…
folkertdev Mar 8, 2025
5c61b66
add `vec_any_*` and `vec_all_*`
folkertdev Mar 8, 2025
f7dc654
add `vec_mulo`
folkertdev Mar 8, 2025
44cda13
add `vec_mulh`
folkertdev Mar 8, 2025
3b8973d
add `vec_meadd`, `vec_moadd`, `vec_mhadd` and `vec_mladd`
folkertdev Mar 8, 2025
1f202e7
shink the size of type signatures
folkertdev Mar 16, 2025
81f6100
move unsafe pointer writes to the surface
folkertdev Mar 16, 2025
14ddd42
Incldue loongarch64 in the list of other architectures
heiher Mar 20, 2025
c0fc23f
Fix: stabilized version of RISC-V feature macro
a4lg Mar 20, 2025
ad03413
std_detect: Add target features for LoongArch v1.1
heiher Mar 18, 2025
a03fdf1
use consistent wording around the 'undefined' intrinsics, and slightl…
RalfJung Mar 18, 2025
a9135c1
Temporary fix: change the feature gate of VEX variants
sayantn Mar 24, 2025
1c136dd
std_detect: Support detecting more features on AArch64 Windows
taiki-e Mar 18, 2025
a083e2a
Minor correction to __m512d documentation.
dpathakj Mar 24, 2025
ebe8804
sse42: Add unsafe blocks around unsafe function calls
petrochenkov Mar 22, 2025
be20f62
silence `clippy::eq_op` while checking
a4lg Mar 21, 2025
5feb3c9
resolve `clippy::doc_lazy_continuation`
a4lg Mar 21, 2025
14fc81b
reorder all RISC-V features for maintenance
a4lg Mar 21, 2025
1c6d764
reword RISC-V feature documentation
a4lg Mar 21, 2025
55fbe86
tentatively remove the "B" RISC-V extension from the documentation
a4lg Mar 21, 2025
08b9752
refactor - arm_shared intrinsics are now YAML, where possible use anchor
Jamesbarford Mar 14, 2025
2099ecc
pr feedback - remove the commented out `vcombine_f16`
Jamesbarford Mar 25, 2025
69a7cb8
add `s390x` to the module docs
folkertdev Mar 16, 2025
9c8f736
make documentation headers consistent
folkertdev Mar 16, 2025
0965a88
std_detect: Always avoid dlsym on *-linux-{musl,ohos}* targets
taiki-e Mar 18, 2025
5b9cdf2
std_detect: Move cfgs into getauxval helper function
taiki-e Mar 25, 2025
3ea2e56
allow unnecessary transmutes
bend-n Mar 27, 2025
6e4ad9c
RISC-V: check cfg (batch 1)
a4lg Apr 6, 2025
9760621
Update SDE to 9.53.0
sayantn Apr 1, 2025
fbd13bd
Add feature detection for new amx variants and movrs
sayantn Apr 1, 2025
a721b3e
Disable cfg check for the recently-merged target features to allow st…
sayantn Apr 10, 2025
b504652
fix broken intra doc links
bend-n Apr 10, 2025
2f74214
hmm
bend-n Apr 11, 2025
897188c
RISC-V: doc: Capitalize some words for consistency
a4lg Apr 11, 2025
333882a
RISC-V: doc: Updated status and clarification
a4lg Apr 11, 2025
217fdb9
RISC-V: doc: tidying: Move link to the ISA Manual
a4lg Apr 11, 2025
0b0c0e4
RISC-V: tidying: Fix separation of I-related extensions
a4lg Apr 11, 2025
c36e9de
RISC-V: tidying: Prefer more canonical reference
a4lg Apr 11, 2025
e35bc48
RISC-V: tidying: Handling of base ISA
a4lg Apr 11, 2025
5c0c7ac
RISC-V: tidying: Make auxvec-based enablement a block
a4lg Apr 11, 2025
2759545
RISC-V: Remove `enable_features`
a4lg Apr 11, 2025
53e8949
RISC-V: Use `target_arch` for RV(32|64) detection
a4lg Apr 11, 2025
68c54c1
RISC-V: Add two "A" extension subsets
a4lg Apr 11, 2025
ed2d3ee
RISC-V: Add placeholder for the "B" extension
a4lg Apr 11, 2025
de643c0
RISC-V: Add RISC-V + Linux / Android test
a4lg Apr 11, 2025
db188b3
RISC-V: OS-independent implication logic
a4lg Apr 13, 2025
d5baf4d
RISC-V: `riscv_hwprobe`-based feature detection on Linux / Android
a4lg Apr 13, 2025
ceaeba1
RISC-V: Remove privileged extensions for now
a4lg Apr 13, 2025
2d2390e
std_detect: Remove RV32E support attempt on Linux (RISC-V)
a4lg Apr 16, 2025
8f30830
Revert "std_detect: Do not use libc::getauxval on 32-bit Android"
taiki-e Apr 16, 2025
ccf3666
Add checks for void pointer types to ensure consistency
sayantn Apr 17, 2025
b10a681
Change void* type for 3 intrinsics
sayantn Apr 17, 2025
376c3f3
Change void* type for `compressstore` intrinsics
sayantn Apr 17, 2025
d6b0426
Change void* type for `cvt_storeu` intrinsics
sayantn Apr 17, 2025
e804386
Change void* type for `gather`/`scatter` intrinsics
sayantn Apr 17, 2025
c899659
add `vec_extract`, `vec_insert`, `vec_promote` and `vec_insert_and_zero`
folkertdev Apr 11, 2025
3dd82b6
allow unnecessary transmutes
bend-n Apr 17, 2025
9abc26f
Remove impl_tag from CONTRIBUTING.md file
arshitas Apr 7, 2025
4621641
std_detect: Remove /proc/cpuinfo-based detection
taiki-e Mar 18, 2025
c10b7f8
Upgrade CI OS versions
sayantn Apr 14, 2025
6cc1715
Re-enable all conditionally-disabled x86 `assert_instr` tests
sayantn Apr 14, 2025
f6fbd66
Add PowerPC64 to CI
sayantn Apr 14, 2025
cc6855e
Remove `cupid` dependency and `env-override-no-avx` CI run
sayantn Apr 15, 2025
b3a7ba4
Change test skipping logic a little, separate feature-based and funct…
sayantn Apr 15, 2025
bc9e29d
Replace `cfg(stdarch_intel_sde)` with `STDARCH_TEST_SKIP_FUNCTION`
sayantn Apr 15, 2025
f2870b7
Remove `STDARCH_DISABLE_DEDUP_GUARD` as it was unused
sayantn Apr 15, 2025
db127cd
Upgrade qemu CPU to `max`
sayantn Apr 18, 2025
867fe30
Add `test-everything` annotations to more archs to ensure test covera…
sayantn Apr 18, 2025
6c4b416
Add `-Ctarget-feature=+avx512f` run for the emulated run
sayantn Apr 15, 2025
1f40595
Remove `x86_64-unknown-linux-gnu` run
sayantn Apr 17, 2025
421bf53
Augment `stdarch-test` to parse PPC
sayantn Apr 20, 2025
1e3c5e3
use 'unadjusted' ABI for wasm LLVM intrinsics
RalfJung Apr 20, 2025
f77386c
run `powerpc64le` `assert_instr` on CI
folkertdev Apr 20, 2025
a4ddd6c
run `cargo generate-lockfile` before running docker
folkertdev Apr 21, 2025
e0b634e
reset the host linker
folkertdev Apr 21, 2025
5fb4fab
Add power9 and power8 target-features
lu-zero Apr 20, 2025
444c636
Re-enable `armv7-unknown-linux-gnueabihf`
sayantn Apr 13, 2025
e61df09
Remove workarounds for llvm/llvm-project#98306
sayantn Apr 13, 2025
7db430f
std_detect: RISC-V platform guide documentation
a4lg Apr 17, 2025
caf463a
Fix CI errors due to alignment issues in msvc
sayantn Apr 28, 2025
288ae22
Fix errors in decoupling avx512vl and avx512dq from avx512fp16
sayantn Apr 28, 2025
a213968
Add `avx512vl` requirement to testsuite for avx512fp16 128 and 256 bit
sayantn Apr 28, 2025
50010d5
Revert "std_detect: RISC-V platform guide documentation"
a4lg Apr 30, 2025
400dab3
Fix `stdarch-verify`
sayantn Apr 29, 2025
ed25a9b
Implement `sha512`, `sm3` and `sm4` intrinsics
sayantn Apr 29, 2025
4d665d1
Require `fma` and `f16c` for `avx512f` in `std_detect`
sayantn Apr 18, 2025
f8782f7
Fix errors in incorrect SAE and ROUNDING parameters
sayantn May 2, 2025
ef92b59
fix - aarch64_be tests
Jamesbarford Apr 22, 2025
c65583c
Pr feedback for instruction & hookup CI for aarch64_be
Jamesbarford Apr 22, 2025
45ee41c
pr feedback - take the instruction count bump out of Dockerfile
Jamesbarford Apr 25, 2025
af3bd7b
retry adding aarch64_be to the pipeline
Jamesbarford Apr 25, 2025
052293b
add printouts for debugging
Jamesbarford Apr 30, 2025
206c35a
change how the test is run
Jamesbarford May 1, 2025
b1ad50f
Add `riscv32` CI run
sayantn Apr 23, 2025
f88c990
Fix segfault in cirrus CI
sayantn Apr 23, 2025
949fd56
Edit `macro_trailing_commas` to enable tests in all architectures
sayantn May 4, 2025
546e265
Run `aarch64-pc-windows-msvc` runs on the new `windows-11-arm` runners
sayantn May 4, 2025
63235a6
Partially stabilize LoongArch target features
heiher Jan 6, 2025
98c4ba9
Stabilize runtime detection of VEX variants of avx512
sayantn Mar 25, 2025
806848f
Correct rustc version for the stabilization of runtime detection of V…
sayantn May 17, 2025
a850e87
`avx512_target_feature` is now stable on nightly
folkertdev May 19, 2025
42e6ad3
use the right load instruction
folkertdev May 19, 2025
4f35c02
in `intrinsic-test`, format f16 like C
folkertdev May 19, 2025
7b99525
use a tuple to return the condition code
folkertdev May 19, 2025
b58ce62
allow aarch64_softfloat_neon for backwards compatibility
RalfJung May 20, 2025
f282add
Removed library/stdarch submodule
Kobzol Jun 2, 2025
64131ba
Merge `stdarch` as a Josh subtree
Kobzol Jun 2, 2025
66f684f
Add autolabel and mentions entries to triagebot.toml
Kobzol Jun 2, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@
path = src/doc/rust-by-example
url = https://github.com/rust-lang/rust-by-example.git
shallow = true
[submodule "library/stdarch"]
path = library/stdarch
url = https://github.com/rust-lang/stdarch.git
shallow = true
[submodule "src/doc/edition-guide"]
path = src/doc/edition-guide
url = https://github.com/rust-lang/edition-guide.git
Expand Down
1 change: 0 additions & 1 deletion library/stdarch
Submodule stdarch deleted from b6e224
16 changes: 16 additions & 0 deletions library/stdarch/.cirrus.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
task:
name: x86_64-unknown-freebsd
freebsd_instance:
image_family: freebsd-13-4
env:
# FIXME(freebsd): FreeBSD has a segfault when `RUST_BACKTRACE` is set
# https://github.com/rust-lang/rust/issues/132185
RUST_BACKTRACE: "0"
setup_script:
- curl https://sh.rustup.rs -sSf --output rustup.sh
- sh rustup.sh --default-toolchain nightly -y
- . $HOME/.cargo/env
- rustup default nightly
test_script:
- . $HOME/.cargo/env
- cargo build --all
4 changes: 4 additions & 0 deletions library/stdarch/.git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Use `git config blame.ignorerevsfile .git-blame-ignore-revs` to make `git blame` ignore the following commits.

# format with style edition 2024
fc87bd98d689590a0b6f5ee4110c5b9f962faa66
288 changes: 288 additions & 0 deletions library/stdarch/.github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,288 @@
name: CI
on:
pull_request:
merge_group:

jobs:
style:
name: Check Style
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust
run: rustup update nightly --no-self-update && rustup default nightly
- run: ci/style.sh

docs:
name: Build Documentation
needs: [style]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust
run: rustup update nightly --no-self-update && rustup default nightly
- run: ci/dox.sh
env:
CI: 1

verify:
name: Automatic intrinsic verification
needs: [style]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust
run: rustup update nightly --no-self-update && rustup default nightly
- run: cargo test --manifest-path crates/stdarch-verify/Cargo.toml

test:
needs: [style]
name: Test
runs-on: ${{ matrix.target.os }}
strategy:
matrix:
profile:
- dev
- release
target:
# Dockers that are run through docker on linux
- tuple: i686-unknown-linux-gnu
os: ubuntu-latest
- tuple: x86_64-unknown-linux-gnu
os: ubuntu-latest
- tuple: arm-unknown-linux-gnueabihf
os: ubuntu-latest
- tuple: armv7-unknown-linux-gnueabihf
os: ubuntu-latest
- tuple: aarch64-unknown-linux-gnu
os: ubuntu-latest
- tuple: aarch64_be-unknown-linux-gnu
os: ubuntu-latest
- tuple: riscv32gc-unknown-linux-gnu
os: ubuntu-latest
- tuple: riscv64gc-unknown-linux-gnu
os: ubuntu-latest
- tuple: powerpc-unknown-linux-gnu
os: ubuntu-latest
- tuple: powerpc64-unknown-linux-gnu
os: ubuntu-latest
- tuple: powerpc64le-unknown-linux-gnu
os: ubuntu-latest
# MIPS targets disabled since they are dropped to tier 3.
# See https://github.com/rust-lang/compiler-team/issues/648
#- tuple: mips-unknown-linux-gnu
# os: ubuntu-latest
#- tuple: mips64-unknown-linux-gnuabi64
# os: ubuntu-latest
#- tuple: mips64el-unknown-linux-gnuabi64
# os: ubuntu-latest
#- tuple: mipsel-unknown-linux-musl
# os: ubuntu-latest
- tuple: s390x-unknown-linux-gnu
os: ubuntu-latest
- tuple: i586-unknown-linux-gnu
os: ubuntu-latest
- tuple: nvptx64-nvidia-cuda
os: ubuntu-latest
- tuple: thumbv6m-none-eabi
os: ubuntu-latest
- tuple: thumbv7m-none-eabi
os: ubuntu-latest
- tuple: thumbv7em-none-eabi
os: ubuntu-latest
- tuple: thumbv7em-none-eabihf
os: ubuntu-latest
- tuple: loongarch64-unknown-linux-gnu
os: ubuntu-latest
- tuple: wasm32-wasip1
os: ubuntu-latest

# macOS targets
- tuple: x86_64-apple-darwin
os: macos-15-large
- tuple: x86_64-apple-ios-macabi
os: macos-15-large
- tuple: aarch64-apple-darwin
os: macos-15
- tuple: aarch64-apple-ios-macabi
os: macos-15
# FIXME: gh-actions build environment doesn't have linker support
# - tuple: i686-apple-darwin
# os: macos-13

# Windows targets
- tuple: x86_64-pc-windows-msvc
os: windows-2025
- tuple: i686-pc-windows-msvc
os: windows-2025
- tuple: aarch64-pc-windows-msvc
os: windows-11-arm
- tuple: x86_64-pc-windows-gnu
os: windows-2025
# - tuple: i686-pc-windows-gnu
# os: windows-latest

# Add additional variables to the matrix variations generated above using `include`:
include:
# `TEST_EVERYTHING` setups - there should be at least 1 for each architecture
- target:
tuple: aarch64-unknown-linux-gnu
os: ubuntu-latest
test_everything: true
- target:
tuple: aarch64_be-unknown-linux-gnu
os: ubuntu-latest
test_everything: true
build_std: true
- target:
tuple: armv7-unknown-linux-gnueabihf
os: ubuntu-latest
test_everything: true
- target:
tuple: loongarch64-unknown-linux-gnu
os: ubuntu-latest
test_everything: true
- target:
tuple: powerpc-unknown-linux-gnu
os: ubuntu-latest
disable_assert_instr: true
test_everything: true
- target:
tuple: powerpc64-unknown-linux-gnu
os: ubuntu-latest
disable_assert_instr: true
test_everything: true
- target:
tuple: powerpc64le-unknown-linux-gnu
os: ubuntu-latest
test_everything: true
- target:
tuple: riscv32gc-unknown-linux-gnu
os: ubuntu-latest
test_everything: true
build_std: true
- target:
tuple: riscv64gc-unknown-linux-gnu
os: ubuntu-latest
test_everything: true
- target:
tuple: s390x-unknown-linux-gnu
os: ubuntu-latest
test_everything: true
- target:
tuple: x86_64-unknown-linux-gnu
os: ubuntu-latest
test_everything: true
# MIPS targets disabled since they are dropped to tier 3.
# See https://github.com/rust-lang/compiler-team/issues/648
#- target:
# tuple: mips-unknown-linux-gnu
# os: ubuntu-latest
# norun: true
#- target:
# tuple: mips64-unknown-linux-gnuabi64
# os: ubuntu-latest
# norun: true
#- target:
# tuple: mips64el-unknown-linux-gnuabi64
# os: ubuntu-latest
# norun: true
#- target:
# tuple: mipsel-unknown-linux-musl
# os: ubuntu-latest
# norun: true
- target:
tuple: aarch64-apple-darwin
os: macos-15
norun: true # https://github.com/rust-lang/stdarch/issues/1206
- target:
tuple: aarch64-apple-ios-macabi
os: macos-15
norun: true # https://github.com/rust-lang/stdarch/issues/1206

steps:
- uses: actions/checkout@v4
- name: Install Rust
run: |
rustup update nightly --no-self-update
rustup default nightly
shell: bash
if: matrix.target.os != 'windows-11-arm'
- name: Install Rust for `windows-11-arm` runners
# The arm runners don't have Rust pre-installed (https://github.com/actions/partner-runner-images/issues/77)
run: |
curl https://sh.rustup.rs | sh -s -- -y --default-toolchain nightly
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
shell: bash
if: matrix.target.os == 'windows-11-arm'

- run: rustup target add ${{ matrix.target.tuple }}
shell: bash
if: matrix.build_std == ''
- run: |
rustup component add rust-src
echo "CARGO_UNSTABLE_BUILD_STD=std" >> $GITHUB_ENV
shell: bash
if: matrix.build_std != ''

# Configure some env vars based on matrix configuration
- run: echo "PROFILE=--profile=${{matrix.profile}}" >> $GITHUB_ENV
shell: bash
- run: echo "NORUN=1" >> $GITHUB_ENV
shell: bash
if: matrix.norun != '' || startsWith(matrix.target.tuple, 'thumb') || matrix.target.tuple == 'nvptx64-nvidia-cuda'
- run: echo "STDARCH_TEST_EVERYTHING=1" >> $GITHUB_ENV
shell: bash
if: matrix.test_everything != ''
- run: echo "STDARCH_DISABLE_ASSERT_INSTR=1" >> $GITHUB_ENV
shell: bash
if: matrix.disable_assert_instr != ''
- run: echo "NOSTD=1" >> $GITHUB_ENV
shell: bash
if: startsWith(matrix.target.tuple, 'thumb') || matrix.target.tuple == 'nvptx64-nvidia-cuda'

# Windows & OSX go straight to `run.sh` ...
- run: ./ci/run.sh
shell: bash
if: matrix.target.os != 'ubuntu-latest' || startsWith(matrix.target.tuple, 'thumb')
env:
TARGET: ${{ matrix.target.tuple }}

# ... while Linux goes to `run-docker.sh`
- run: ./ci/run-docker.sh ${{ matrix.target.tuple }}
shell: bash
if: matrix.target.os == 'ubuntu-latest' && !startsWith(matrix.target.tuple, 'thumb')
env:
TARGET: ${{ matrix.target.tuple }}

build-std-detect:
needs: [style]
name: Build std_detect
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust
run: rustup update nightly && rustup default nightly
- run: ./ci/build-std-detect.sh

conclusion:
needs:
- docs
- verify
- test
- build-std-detect
runs-on: ubuntu-latest
# We need to ensure this job does *not* get skipped if its dependencies fail,
# because a skipped job is considered a success by GitHub. So we have to
# overwrite `if:`. We use `!cancelled()` to ensure the job does still not get run
# when the workflow is canceled manually.
#
# ALL THE PREVIOUS JOBS NEED TO BE ADDED TO THE `needs` SECTION OF THIS JOB!
if: ${{ !cancelled() }} # make sure this is never "skipped"
steps:
- name: Conclusion
run: |
# Print the dependent jobs to see them in the CI log
jq -C <<< '${{ toJson(needs) }}'
# Check if all jobs that we depend on (in the needs array) were successful.
jq --exit-status 'all(.result == "success")' <<< '${{ toJson(needs) }}'
10 changes: 10 additions & 0 deletions library/stdarch/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Cargo.lock
.*.swp
target
tags
crates/stdarch-gen-arm/aarch64.rs
crates/stdarch-gen-arm/arm.rs
crates/stdarch-gen-loongarch/lasx.c
crates/stdarch-gen-loongarch/lsx.c
c_programs/*
rust_programs/*
Empty file added library/stdarch/.gitmodules
Empty file.
Loading
Loading