about summary refs log tree commit diff
path: root/library/stdarch
AgeCommit message (Collapse)AuthorLines
2024-12-13Remove buffers in tests for {f,}xsave{c,}{64,}Martin Liska-84/+0
Fixes: #1672
2024-12-13Enable LoongArch CIWANG Rui-3/+2
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-2/+23
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
2024-11-30Enable `without cfg check` test in `std_detect`Urgau-3/+2
2024-11-29Simplify some code in examplesEduardo Sánchez Muñoz-32/+10
2024-11-28remove docs publishingMarcoIeni-25/+0
2024-11-28add conclusion jobMarcoIeni-8/+14
2024-11-28use merge queueMarcoIeni-14/+26
2024-11-27Recommend using `run-docker.sh` instead of `run.sh` in `CONTRIBUTING.md`Asuna-2/+2
2024-11-27Fix RISC-V Packed SIMD intrinsics compilationAsuna-19/+136
2024-11-27Disable loongarch and wasm in CI due to fallout from SIMD ABI checkingAmanieu d'Antras-4/+5
2024-11-27Fix types for ARM SIMD32 intrinsicsAmanieu d'Antras-43/+43
These were previously defined using vector types which is incorrect. Instead, `{u}int{8x4,16x2}_t` are aliases for `i32` and `u32`. This also fixes CI since these types don't need to be passed in NEON registers and this was triggering a newly added compiler warning.
2024-11-10move wasm comment to a better placeRalf Jung-3/+3
2024-11-10remove test --skip that references a long-closed issueRalf Jung-4/+0
2024-11-10Fix `asm!` options for `_mm_mask_load_sh` and `_mm_maskz_load_sh`Eduardo Sánchez Muñoz-2/+2
These functions read from a pointer, so `readonly` has to be used instead of `nomem`.
2024-11-10Fix duplicated doc comment line and empty line after doc commentEduardo Sánchez Muñoz-3/+0
2024-11-08Add compile-time tests against unexpected target features cfgsUrgau-0/+24
2024-11-08Mark feature with missing corresponding target feature cfgs as suchUrgau-0/+27
Computed by diffing of: $ rg "[ ]+@FEATURE: .*: \"(.*)\";" -r '$1' --no-filename \ crates/std_detect/src/detect/ | sort | uniq With (from the main Rust repo[^1]): $ rg "target_feature" tests/ui/check-cfg/well-known-values.stderr [^1]: https://github.com/rust-lang/rust/blob/e8c698bb3bdc121ac7f65919bd16d22f6567a3f1/tests/ui/check-cfg/well-known-values.stderr#L177
2024-11-08Add ability to declare a feature without cfg checkingUrgau-1/+5
This is necessary to avoid `unexpected_cfgs` warnings for unexpected/ missing target features, in user code.
2024-11-07ci: fix matrix usageDavid Wood-97/+105
2024-11-07ci: add debug testingDavid Wood-14/+19
Previous changes in Rust and LLVM have caused stdarch to be broken in debug, so add testing to ensure that this is caught.
2024-11-03ci: Use distro toolchain for loongarch64-unknown-linux-gnuWANG Rui-15/+10
2024-11-01Use C-unwind abi for the llvm.wasm.throw intrinsicNoa-1/+1
2024-11-01core_arch: powerpc: Fix documentation for vec_ctuJens Reidel-1/+1
Like the name suggests, this converts to unsigned integers rather than signed. I assume this was copy pasted from vec_cts. Signed-off-by: Jens Reidel <adrian@travitia.xyz>
2024-10-28cleanup wasm const fnRalf Jung-16/+0
2024-10-27std_detect: Add pauth-lr aarch64 target featureKajetan Puchalski-0/+8
Add feature detection for aarch64 FEAT_PAuth_LR. There is currently no Linux cpuinfo support so the OS-specific lines are commented out.
2024-10-14core_arch: Add LoongArch frecipe intrinsicsWANG Rui-12/+184
2024-10-14stdarch-gen: Add LoongArch frecipe intrinsicsWANG Rui-17/+135
2024-10-10avoid rustc_const_stable on internal functionRalf Jung-2/+18
2024-10-01Clean up examples, make it more "Rusty"Yuri Astrakhan-42/+15
2024-09-30Fix `__crc32d` and `__crc32cd` not showing up in standard library docsAmanieu d'Antras-34/+6
2024-09-30Add all crates to workspaceYuri Astrakhan-11/+8
I am not certain why some crates are missing - it might be by accident or on purpose, so feel free to reject. This makes sure no crate is missed by accident, and also removed the non-existent `wasm-assert-instr-tests` crate. P.S. Also, added some crate-level lints, but perhaps these should be added to all crates in the workspace?
2024-09-30Minor lintingYuri Astrakhan-22/+13
2024-09-28Clean up docs, fixing indentation and formattingYuri Astrakhan-33/+28
2024-09-28Improve stdarch-gen-arm a bitYuri Astrakhan-122/+88
Minor nits in the code, like usage of `&Option<str>`
2024-09-23Simplify code related to testing of xtestMartin Liska-27/+3
2024-09-22Upgrade Intel SDE to v9.44Sayantan Chakraborty-6/+5
Re-enabled `assert_instr`
2024-09-22Use Cargo.toml lints instead of a build scriptSayantan Chakraborty-3/+3