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,458 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
2458 commits
Select commit Hold shift + click to select a range
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
08484b5
std_detect: RISC-V platform guide documentation (non-table part)
a4lg Apr 30, 2025
d7edb3e
Feat: Moved majority of the code to `arm` module.
madhav-madhusoodanan Mar 25, 2025
1d39fd0
Chore: Added `SupportedArchitectureTest` trait which must be implemen…
madhav-madhusoodanan Mar 25, 2025
8cb9183
chore: Added `ProcessedCli` to extract the logic to pre-process CLI s…
madhav-madhusoodanan Mar 26, 2025
17277d7
chore: separated common logic within file creations, compile_c, compi…
madhav-madhusoodanan Mar 27, 2025
c862432
chore: code consolidation
madhav-madhusoodanan Mar 27, 2025
ca67119
chore: added match block in `src/main.rs`
madhav-madhusoodanan Mar 27, 2025
e15d6fa
fixed `too many files open` issue
madhav-madhusoodanan Mar 30, 2025
8e269af
maintaining special list of targets which need different execution co…
madhav-madhusoodanan Apr 2, 2025
bb1dfa0
rename struct for naming consistency
madhav-madhusoodanan Apr 2, 2025
9927915
test commit to check if `load_Values_c` can be dissociated from targe…
madhav-madhusoodanan Apr 13, 2025
9d3c09e
added target field within `IntrinsicType` to perform target level che…
madhav-madhusoodanan Apr 14, 2025
a993b44
Updated `Argument::from_c` to remove `ArgPrep` specific argument
madhav-madhusoodanan Apr 14, 2025
57c3575
introduced generic types and code refactor
madhav-madhusoodanan Apr 16, 2025
f05ffd4
Added a macro to simplify <Arch>IntrinsicType definitions
madhav-madhusoodanan Apr 16, 2025
add7b2e
renamed `a64_only` data member in `Intrinsic` to `arch_tags`
madhav-madhusoodanan Apr 16, 2025
445137a
Removed aarch64-be specific execution command for rust test files
madhav-madhusoodanan Apr 17, 2025
587d8ce
moved the C compilation commands into a struct for easier handling
madhav-madhusoodanan Apr 18, 2025
8d0141e
Added dynamic dispatch for easier management of `<arch>ArchitectureTe…
madhav-madhusoodanan Apr 19, 2025
a416e3e
code cleanup
madhav-madhusoodanan Apr 19, 2025
86f23a6
chore: file renaming
madhav-madhusoodanan Apr 23, 2025
9b47689
feat: made constraint common
madhav-madhusoodanan Apr 28, 2025
c01c6ce
fix: aarch64_be issues wthin compilation
madhav-madhusoodanan May 4, 2025
2a5e678
moved more code generation functionality to `common`
madhav-madhusoodanan May 10, 2025
6de5b7b
feat: merging changes related to f16 formatting
madhav-madhusoodanan May 21, 2025
57006ad
Fix: removed BaseIntrinsicTypeDefinition + code cleanup
madhav-madhusoodanan May 25, 2025
54e277c
fix: moved f16 formatting code to common module
madhav-madhusoodanan May 25, 2025
d8469be
fix: moved common code (that required no architecture-specific
madhav-madhusoodanan May 25, 2025
3e74af1
fix: code cleanup and renaming
madhav-madhusoodanan May 26, 2025
87b28d4
Check cfg on features that stage0 compiler support
a4lg May 14, 2025
9561e8e
cmpxchg16b: use atomic_compare_exchange from libcore
RalfJung May 29, 2025
a4a7184
mark gfni, vaes, vpclmulqdq intrinsics as safe
usamoi May 29, 2025
7965452
Fix `ldpte` and `lddir` signature
sayantn May 27, 2025
7afd613
Fix PPC shift and rotate intrinsics
sayantn May 27, 2025
28960ec
Fix s390x intrinsics
sayantn May 27, 2025
3de76d4
Use the new definition of `rdtscp` intrinsic
sayantn May 27, 2025
cd63f26
Upgrade more intrinsics to the new version
sayantn May 28, 2025
5984f7c
Add back `std_detect_env_override`
sayantn May 22, 2025
7a074c1
RISC-V: Linux: Imply Zicntr from the IMA base behavior
a4lg May 26, 2025
7168d48
stdarch-gen-arm: Modernization of the coding style
a4lg May 31, 2025
9610536
stdarch-gen-loongarch: Modernization of the coding style
a4lg May 31, 2025
ee64b85
stdarch-test: Modernization of the coding style
a4lg May 31, 2025
d63fde9
stdarch-verify: Modernization of the coding style
a4lg May 31, 2025
c5693ed
stdarch_examples: Modernization of the coding style
a4lg May 31, 2025
26ff29e
intrinsic-test: Modernization of the coding style
a4lg May 31, 2025
ba641e5
Stabilize keylocker intrinsics and runtime detection
sayantn May 7, 2025
1ca4587
Stabilize `sha512`, `sm3` and `sm4` intrinsics and runtime detection
sayantn May 7, 2025
e28cff7
intrinsic-test: Use `c_prefix` to generate type names
a4lg May 31, 2025
a78d64e
intrinsic-test: Reverse `has_constraints()` condition
a4lg May 31, 2025
5211541
use `simd_bitreverse` on `aarch64`
folkertdev May 30, 2025
bc43335
RISC-V: Linux 6.15 `riscv_hwprobe` support
a4lg May 31, 2025
d258728
Revert vbsl[q]_f16 to unstable
adamgemmell May 30, 2025
3fe6f76
Mark Neon f16 vectors as unstable
adamgemmell May 30, 2025
2665fe5
Use rust intrinsics for more ARM intrinsics
sayantn Jun 2, 2025
5d47941
Use correct LLVM intrinsic for `vmull` and `vaddv`
sayantn Jun 2, 2025
068cc37
Remove uses of deprecated type-specific pointers from ARM
sayantn Jun 2, 2025
77174a3
Fix incorrect intrinsic name in X86
sayantn Jun 2, 2025
7a9e01a
Fix incorrect intrinsic name in WASM
sayantn Jun 2, 2025
68c0308
Stabilize AVX512 intrinsics
Amanieu Jun 2, 2025
a7a931c
Removed `library/stdarch` submodule
Kobzol Jun 9, 2025
7cd9cf4
Import stdarch history as a Josh subtree
Kobzol Jun 9, 2025
8121315
Remove stdarch submodule checkout
Kobzol Jun 9, 2025
b644ddc
Add stdarch smoke test
Kobzol Jun 9, 2025
11d63c5
Add lockfile to `stdarch`
Kobzol Jun 10, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
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 5c1c43
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) }}'
9 changes: 9 additions & 0 deletions library/stdarch/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.*.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