about summary refs log tree commit diff
path: root/library/stdarch/crates
AgeCommit message (Collapse)AuthorLines
2025-02-09Apply unsafe_attr_outside_unsafeEric Huss-2/+2
2025-02-09Apply rust_2024_incompatible_patEric Huss-2/+2
2025-02-09Apply missing_unsafe_on_externEric Huss-1116/+1116
2025-02-07some doc changesFolkert de Vries-5/+5
2025-02-07add `vec_splats` for s390xFolkert de Vries-2/+97
2025-02-07add `vec_abs` for s390xFolkert de Vries-1/+53
2025-02-07add `vec_max` and `vec_min` for s390xFolkert de Vries-2/+84
2025-02-07add `vec_sub` and `vec_mul` for s390xFolkert de Vries-1/+304
2025-02-07implement `VectorAdd` for `s390x`Folkert de Vries-2/+9
2025-02-07Small refactorings in `x86-intel.rs`sayantn-65/+18
remove `PRINT_MISSING_LISTS` as it was unused rename `PRINT_MISSING_LISTS_MARKDOWN`
2025-02-07Move all x86 std_detect tests to `x86-specific.rs` to reduce duplicationsayantn-91/+15
2025-02-07Remove CSR accessing tests as they are immediate UBsayantn-115/+4
2025-02-07Fix names of several testssayantn-57/+52
Rewrote `_mm_cvtps_ph` and `_mm_cvtph_ps` tests
2025-02-03Consistently use the latest itertools.Jacob Bramley-1/+1
2025-02-03Update stdarch-gen-arm path generation.Jacob Bramley-50/+81
Fix both the instructions for how to regenerate each `generated.rs`, and the logic for inferring the correct output path from each input `.spec.yml`.
2025-01-29Fix usage of proc_macro2::Punct.Jacob Bramley-3254/+52
Restructure stdarch-gen-arm to use `Group`s with `Delimiter`s rather than ad-hoc `Punct`s. `Punct` should only be used to represent specific characters, and never for bracket-like characters. Recent versions of `Punct::new` check this with an assertion. Note that there doesn't appear to be a way to emit a line break for formatting reasons — `Punct::new('\n', ...)` no longer works — so this also removes all blank lines between functions in the generated files.
2025-01-20implement `VectorAdd` for `s390x`Folkert de Vries-5/+518
2025-01-20basic infra for s390x vector intrinsicsFolkert de Vries-0/+42
2025-01-16add `is_s390x_feature_detected`Folkert de Vries-15/+158
2025-01-16refactor - remove Sized as it is implicitJames Barford-Evans-2/+2
2025-01-16remove - relaxing if sizeJames Barford-Evans-2/+2
2025-01-16fix: always inline signed conversionsJames Barford-Evans-2/+2
2025-01-16PR feedback & pipelineJames Barford-Evans-357/+124
2025-01-16Remove old ARM intrinsic generatorJames Barford-Evans-11423/+4
2025-01-16Generator supports creating neon instructions from YAMLJames Barford-Evans-58175/+75229
2025-01-16Generator for SVE intrinsics.Luca Vizzarro-0/+6185
Co-authored-by: Jamie Cunliffe <Jamie.Cunliffe@arm.com> Co-authored-by: Jacob Bramley <jacob.bramley@arm.com> Co-authored-by: Luca Vizzarro <Luca.Vizzarro@arm.com> Co-authored-by: Adam Gemmell <adam.gemmell@arm.com>
2025-01-16Add SVE support to stdarch-verifyAdam Gemmell-51/+219
Co-authored-by: Jamie Cunliffe <Jamie.Cunliffe@arm.com> Co-authored-by: Jacob Bramley <jacob.bramley@arm.com> Co-authored-by: Luca Vizzarro <Luca.Vizzarro@arm.com>
2024-12-29Fix typo and prettify commentSatoshi Tanda-5/+3
2024-12-27Remove 2 unused intrinsicssayantn-4/+0
2024-12-27Remove v64.rs as it was superseded by simd.rssayantn-85/+0
2024-12-27Refactor the `as_*` functions in x86sayantn-408/+71
2024-12-23core_arch: Add LoongArch basic intrinsicsWANG Rui-0/+365
2024-12-23Expand feature detection on AArch64 DarwinLaine Taffin Altman-38/+84
This reflects the currently available set of sysctl values as of macOS 15, on 2024-12-21. Features not (yet) exposed by `is_aarch64_feature_detected` have been left in comments to document their existence for the future.
2024-12-21Fix `_mm*_mask_cmp_ep*_mask` bug with `IMM3=7`sayantn-24/+24
2024-12-21Fix Wasm `f*_sqrt()` docdaxpedda-2/+2
2024-12-21Make `assert_instr` strictersayantn-4/+9
2024-12-13Remove buffers in tests for {f,}xsave{c,}{64,}Martin Liska-84/+0
Fixes: #1672
2024-12-12`assert_instr` for AMXSayantan Chakraborty-0/+27
2024-12-12Use `core::intrinsics::fmaf16` instead of LLVM intrinsicSayantan Chakraborty-3/+1
2024-12-12Cleanup: remove redundant target featuresSayantan Chakraborty-48/+71
Make target feature verification stricter
2024-12-12Add numeric instructions for Wasm not available in `core`daxpedda-0/+142
2024-12-09Fix incorrect documentation for _mm_loadu_si64 functionaaishwarymishra@gmail.com-1/+1
2024-12-02wasm: Add missing `#[target_feature]` to simd ctorsAlex Crichton-0/+21
This is a resubmission of #1609 which was ruled optional but not necessary at the time but it's now necessary. These weren't originally applied as they weren't allowed in a `const` context but that's no longer applicable. At the same time though be sure to add some small tests to ensure that these intrinsics can be used in a `const` context.
2024-11-30Fix test-caseMartin Liska-1/+4
2024-11-30Fix and document _mmX_alignr_epiX family of intrinsicsMartin Liska-27/+36
2024-11-30Fix implementation of `_mm256_alignr_epi8<16>`Martin Liska-11/+10
The function is supposed to return first argument for IMM8 == 8.
2024-11-30Fix signature of `_mm512_store{u,}_si512`.Martin Liska-6/+6
Simiarly to other functions for `mm` and `mm256` register widths, the first argument should be a pointer to the pointer type. See e.g. `_mm256_store_si256` function.
2024-11-30remove rustc_allow_const_fn_unstable feature gateRalf Jung-2/+1
2024-11-30Fix the `features` macro.Nicholas Nethercote-1/+1
The first rule of the `features` macro looks like this: ``` macro_rules! features { ( @TARGET: $target:ident; @CFG: $cfg:meta; @MACRO_NAME: $macro_name:ident; @MACRO_ATTRS: $(#[$macro_attrs:meta])* $(@BIND_FEATURE_NAME: $bind_feature:tt; $feature_impl:tt; $(#[$deprecate_attr:meta];)?)* $(@NO_RUNTIME_DETECTION: $nort_feature:tt; )* $(@FEATURE: #[$stability_attr:meta] $feature:ident: $feature_lit:tt; $(without cfg check: $feature_cfg_check:literal;)? $(implied by target_features: [$($target_feature_lit:tt),*];)? $(#[$feature_comment:meta])*)* ) => { ``` Notice all the `tt` specifiers. They are used because they are forwarded to another macro. Only `ident`, `lifetime`, and `tt` specifiers can be forwarded this way. But there is an exception: `$feature_lit:tt`, which was added recently. In theory it should cause an error like this: ``` error: no rules expected `literal` metavariable --> /home/njn/dev/rust3/library/stdarch/crates/std_detect/src/detect/macros.rs:54:91 | 51 | / macro_rules! $macro_name { 52 | | $( 53 | | ($feature_lit) => { 54 | | $crate::detect_feature!($feature, $feature_lit $(, without cfg check: $feature_cfg_check)? ... | | ^^^^^^^^^^^^^^^^^^ no rules expected this token in macro call ... | 88 | | }; 89 | | } | |_________- in this expansion of `is_x86_feature_detected!` | ::: std/tests/run-time-detect.rs:145:27 | 145 | println!("tsc: {:?}", is_x86_feature_detected!("tsc")); | ------------------------------- in this macro invocation | note: while trying to match keyword `true` --> /home/njn/dev/rust3/library/stdarch/crates/std_detect/src/detect/macros.rs:12:55 | 12 | ($feature:tt, $feature_lit:tt, without cfg check: true) => { | ^^^^ = note: captured metavariables except for `:tt`, `:ident` and `:lifetime` cannot be compared to other tokens = note: see <https://doc.rust-lang.org/nightly/reference/macros-by-example.html#forwarding-a-matched-fragment> for more information ``` (The URL at the end of the error has more details about this forwarding limitation.) In practice it doesn't cause this error. I'm not sure why, but the existing macro implementation in rustc is far from perfect, so it's believable that it does the wrong thing here. Why does this matter? Because https://github.com/rust-lang/rust/pull/124141 is modifying the macro implementation, and when that PR is applied the error *does* occur. (It's one of several cases I have found where the existing compiler accepts code it shouldn't, but #124141 causes that code to be rejected.) Fortunately the fix is simple: replace the `literal` specifier with `tt`.
2024-11-30Rework SIMD zeroingTobias Decking-2906/+1468