about summary refs log tree commit diff
path: root/library/stdarch
AgeCommit message (Collapse)AuthorLines
2021-10-21Complete the remaining neon instructions (#1230)Sparrow Li-74/+6907
2021-10-16Fix error message of is_*_feature_detected on nort_feature (#1232)Taiki Endo-1/+1
2021-10-14xcode-select no longer necessary on action runners. (#1231)Hans Kratz-1/+0
2021-10-06Add example to _mm_extract_ps (#1228)Jubilee-2/+23
2021-09-29Complete vld* and vst* neon instructions (#1224)Sparrow Li-228/+10787
2021-09-24Complete vst1 neon instructions (#1221)Sparrow Li-168/+1200
2021-09-20Make dedup guard optional (#1215)Hans Kratz-620/+647
2021-09-20Arm Fused Multiply-Add fixes (#1219)Hans Kratz-19/+60
2021-09-18Complete vld1 instructions with some corrections (#1216)Sparrow Li-766/+1187
2021-09-18Check inlining and instruction count for assert_instr(nop) as well (#1218)Hans Kratz-7/+4
2021-09-09Intrinsic test tool to compare neon intrinsics with C (#1170)Jamie Cunliffe-2/+5672
2021-09-08Normalize [us]shll.* ..., #0 aarch64 disassembly to the preferred [us]xtl.* ↵Hans Kratz-1/+24
(#1213)
2021-09-08Change aarch64 vld1* instructions to not cause individual loads (#1207)Hans Kratz-291/+52
2021-09-09Disable arm inlining check again for now as some tests are still failing.Hans Kratz-1/+1
2021-09-09Use a lighter dedup guard in the assert_instr test shims.Hans Kratz-14/+11
2021-09-08Implement proper subroutine call detection for x86, x86_64, aarch64 and wasm32.Hans Kratz-13/+21
2021-09-08remove assembly parsing special case for otool output (no longer needed)Hans Kratz-10/+1
2021-09-08Run CI on Macos (Big Sur) again. Since otool is no longer used the OOM ↵Hans Kratz-3/+2
should be gone.
2021-09-08using v8.6a target feature to cover more instructionsHans Kratz-1/+1
2021-09-08Use objdump on Macos x86_64 as well.Hans Kratz-32/+7
2021-09-08Use LLVM objdump on Macos ARM64 because it is not possible to enable TME ↵Hans Kratz-0/+18
support with otool
2021-08-31Add vst neon instructions (#1205)Sparrow Li-273/+2455
* add vst neon instructions * modify the instruction limit
2021-08-27powerpc::vector_bool_long is a vector of two i64s (#1204)Joshua Liebow-Feeser-1/+1
2021-08-24add vldx neon instructions (#1200)Sparrow Li-703/+2730
2021-08-23Update codegen for simd wasm intrinsics with LLVM 13 (#1203)Alex Crichton-142/+226
2021-08-22Fix typos “an”→“a”Frank Steffahn-2/+2
2021-08-22Fix typos “a”→“an”Frank Steffahn-6/+6
2021-08-14Fix "it's purpose" -> "its purpose"Pierre Krieger-3/+3
2021-08-14Rewording in Wasm all_true SIMD instruction docsÖmer Sinan Ağacan-4/+4
- Use "true" and "false" instead of "1" and "0" - "nonzero" -> "non-zero" - "returns true if ... or false if ..." -> "returns true ..., false otherwise"
2021-08-12mark core::arch::wasm32::unreachable as safeAleksey Kladov-2/+7
This intrinsic doesn't have any preconditions and is always safe to call, so it can be safe. This function is already stable, but dropping `unsafe` is a backwards compatible change. Note tha we already have a precedent for wasm intrinsics being safe -- wasm simd is safe. It is relatively practically important to mark this safe -- wasm32::unreachable is directly useful in practice as more codesize efficient `panic!()`.
2021-08-12Remove references to the crates on crates.io.Mara Bos-42/+2
They haven't been published in years. This removes the suggestion that the crates on crates.io are actively updated/maintained.
2021-08-11Update arm vcvt intrinsics to use llvm.fpto(su)i.satJamie Cunliffe-10/+61
Those intrinsics have the correct semantics for the desired fcvtz instruction, without any undefined behaviour. The previous simd_cast was undefined for infinite and NaN which could cause issues.
2021-08-11Remove unused wasm featureAmanieu d'Antras-1/+0
2021-08-03Add tests for remaining wasm simd intrinsicsAlex Crichton-40/+366
Wasmtime now supports all of the simd proposal, so this commit uncomments instruction assertions and tests, while also adding more tests, for all wasm simd instructions. This means that all wasm simd instructions should be tested and have running instruction assertions, except for `i64x2.abs`, which will require an LLVM upgrade to LLVM 13.
2021-08-02Remove the bootstrap directive for cryptographic target_featuresAdam Gemmell-126/+57
2021-08-02Replace the crypto feature with aes in generated intrinsics for aarch64Adam Gemmell-15/+15
This allows us to deprecate the crypto target_feature in favour of its subfeatures. We cannot do this yet for ARM targets as LLVM requires the crypto feature. This was fixed in https://github.com/llvm/llvm-project/commit/b8baa2a9132498ea286dbb0d03f005760ecc6fdb
2021-07-30Remove stabilized featuresAlex Crichton-2/+0
2021-07-30Mark f32x4 and f64x2 as const-stable on wasmAlex Crichton-35/+15
Now that `transmute` can be flagged as `const`-stable this commit updates the `f32x4` and `f64x2` constructors as `const`-stable as well. This also additionally rewrites the other integer constructors in a more readable fashion now that the general `v128()` method is `const`-stable.
2021-07-20Force the use of sysv64 calling convention in x86_64 disassembly tests (#1187)Amanieu d'Antras-17/+8
This ensures that results are consistent across windows/linux tests.
2021-07-20Revert "Move `asm!` and `global_asm!` to `core::arch` (#1183)" (#1185)bstrie-26/+0
This reverts commit 9437b11cd4f42c5995eb41aa92ead877b9b7823a.
2021-07-16Document unsafety of wasm simd intrinsics (#1184)Alex Crichton-0/+258
Since most intrinsics are safe it likely makes sense to explicitly document why there are a few intrinsics that are not safe. These intrinsics are all unsafe for the same reason, which is that they're dealing with a raw pointer that must be valid to load/store memory to. Note that the are no alignment requirements on any of these intrinsics.
2021-07-15Move `asm!` and `global_asm!` to `core::arch` (#1183)bstrie-0/+26
2021-06-12Fix the stabilized version for `simd_x86_bittest` (#1182)Yuki Okushi-8/+8
2021-06-11Stabilize `simd_x86_bittest` feature (#1180)Yuki Okushi-8/+8
2021-06-10wasm: Mark simd intrinsics as stable (#1179)Alex Crichton-24/+368
2021-06-10wasm: Mark most simd intrinsics as safe (#1177)Alex Crichton-946/+903
2021-05-28Update aarch64 linux feature detection (#1146)Adam Gemmell-93/+481
2021-05-28Work around rustup bug in FreeBSD CI (#1176)Amanieu d'Antras-1/+5
2021-05-28wasm: Lower alignment of all loads/stores (#1175)Alex Crichton-11/+30
This changes wasm simd intrisnics which deal with memory to match clang where they all are emitted with an alignment of 1. This is expected to not impact performance since wasm engines generally ignore alignment as it's just a hint. Otherwise this can increase safety slightly when used from Rust since if an unaligned pointer was previously passed in that could result in UB on the LLVM side. This means that the intrinsics are slighly more usable in more situations than before. It's expected that if higher alignment is desired then programs will not use these intrinsics but rather the component parts. For example instead of `v128_load` you'd just load the pointer itself (and loading from a pointer in Rust automatically assumes correct alignment). For `v128_load64_splat` you'd do a load followed by a splat operation, which LLVM should optimized into a `v128.load64_splat` instruction with the desired alignment. LLVM doesn't fully support some optimizations (such as optimizing `v128.load16_lane` from component parts) but that's expected to be a temporary issue. Additionally we don't have a way of configuring the alignment on operations that otherwise can't be decomposed into their portions (such as with `i64x2_load_extend_u32x2`), but we can ideally cross such a bridge when we get there if anyone ever needs the alignment configured there.
2021-05-27wasm: Add convenience aliases with unsigned names (#1174)Alex Crichton-4/+108
Naming right now for wasm simd intrinsics takes the signededness of the instruction into account, but some operations are the same regardless of signededness, such as `i32x4_add`. This commit adds aliases for all of these operations under unsigned names as well (such as `u32x4_add`) which are just a `pub use` to rename the item as two names. The goal of this is to assist in reading code (no need to switch back and forth between `i` and `u`) as well as writing code (no need to always remember which operations are the same for signed/unsigned but only available under the signed names).