83 Commits

Author SHA1 Message Date
Folkert de Vries
8dff65f010
Merge pull request #1938 from linkmauve/fjcvtzs
Implement fjcvtzs under the name __jcvt like the C intrinsic
2025-10-10 14:13:13 +00:00
Emmanuel Gil Peyrot
6039ddea09 Implement fjcvtzs under the name __jcvt like the C intrinsic
This instruction is only available when the jsconv target_feature is available,
so on ARMv8.3 or higher.

It is used e.g. by Ruffle[0] to speed up its conversion from f64 to i32, or by
any JS engine probably.

I’ve picked the stdarch_aarch64_jscvt feature because it’s the name of the
FEAT_JSCVT, but hesitated with naming it stdarch_aarch64_jsconv (the name of
the target_feature) or stdarch_aarch64_jcvt (the name of the C intrinsic) or
stdarch_aarch64_fjcvtzs (the name of the instruction), this choice is purely
arbitrary and I guess it could be argued one way or another.  I wouldn’t expect
it to stay unstable for too long, so ultimately this shouldn’t matter much.

This feature is now tracked in this issue[1].

[0] https://github.com/ruffle-rs/ruffle/pull/21780
[1] https://github.com/rust-lang/rust/issues/147555
2025-10-10 13:29:42 +00:00
Sayantan Chakraborty
01dc34d709
Merge pull request #1939 from folkertdev/crc-remove-not-arm
crc32: remove `#[cfg(not(target_arch = "arm"))]` from aarch64 crc functions
2025-10-09 17:37:09 +00:00
Folkert de Vries
4fcf3f86c4
crc32: remove #[cfg(not(target_arch = "arm"))] from crc functions
They are defined in the aarch64 module, so this cfg is pointless.

Note that these instructions do exist for arm, but the aarch64 ones are
already stable, so this would need some additional work to implement
them for arm.
2025-10-09 19:20:20 +02:00
usamoi
00c8866c57 pick changes from https://github.com/rust-lang/rust/pull/146683 2025-09-23 10:17:54 +08:00
usamoi
3b09522c34 Revert "Remove big-endian swizzles from vreinterpret"
This reverts commit 24f89ca53d3374ed8d3e0cbadc1dc89eea41acba.
2025-09-23 10:05:32 +08:00
Folkert de Vries
5dd0fdcd67
Merge pull request #1919 from sayantn/fix-vreinterpret
Remove big-endian swizzles from `vreinterpret`
2025-09-15 08:18:20 +00:00
Tsukasa OI
a3b7aad20f stdarch-gen-arm: Make Clippy happy 2025-09-12 11:50:51 +00:00
sayantn
bb31725e67
Remove big-endian swizzles from vreinterpret 2025-09-12 01:20:34 +05:30
Folkert de Vries
ae648be783
use llvm.roundeven on arm 2025-08-29 12:15:41 +02:00
Folkert de Vries
98bd1d7445
use simd_saturating_{add, sub} on neon 2025-08-21 10:25:00 +02:00
Daniel Paoliello
f2c0c3dd44 Add testing for Arm64EC Windows 2025-08-10 13:19:06 -07:00
klensy
d8bf6c48a4 bump serde_with. Weird that it works without std feature, but 2025-07-23 12:22:33 +03:00
Folkert de Vries
b74c4825cb
test for the high version of a number of instructions 2025-07-17 02:12:15 +02:00
Folkert de Vries
bdd1ca1eea
aarch64: check for trn1 and trn2 2025-07-15 22:17:03 +02:00
Folkert de Vries
c13e3aa6b4
aarch64: check for uzp1 and uzp2 2025-07-15 22:17:02 +02:00
Folkert de Vries
ce3eabfd70
aarch64: check for zip1 and zip2 2025-07-15 22:17:02 +02:00
Folkert de Vries
6444994556
aarch64/arm: fix tests that matched on prefix of instruction 2025-07-15 20:20:46 +02:00
Amanieu d'Antras
2aaa584094
Merge pull request #1872 from folkertdev/aarch64-horizontal-add
`aarch64`: use `intrinsics::simd` for horizontal add and `abs`
2025-07-15 00:19:05 +00:00
Folkert de Vries
48c33b7748
aarch64: implement vabs using instrinsics::simd 2025-07-15 01:36:20 +02:00
Folkert de Vries
42bcb0668e
aarch64: use simd_reduce_add_unordered 2025-07-12 21:50:51 +02:00
Folkert de Vries
17b8fc938d
aarch64: use simd_reduce_min and simd_reduce_max for integers 2025-07-12 18:12:09 +02:00
Folkert de Vries
750ddfd8d3
aarch64: use simd_reduce_min and simd_reduce_max for floats 2025-07-12 18:12:08 +02:00
Folkert de Vries
72afae5fd6
arm: use simd_fmin and simd_fmax 2025-07-12 18:12:08 +02:00
Folkert de Vries
441824cfca
aarch64: use simd_fmin and simd_fmax 2025-07-12 18:12:08 +02:00
Folkert de Vries
ca70466fa3
aarch64: use f16::min and f16::max 2025-07-12 18:12:08 +02:00
Folkert de Vries
301bb69450
Merge pull request #1868 from folkertdev/gen-arm-remove-lazy-static
`stdarch-gen-arm`: remove `lazy_static`, use `LazyLock` instead
2025-07-11 23:44:24 +00:00
Sayantan Chakraborty
cd48abd478
Merge pull request #1858 from folkertdev/aarch-comparison-operators
aarch64: use `core::intrinsics::simd` for integer min/max
2025-07-11 23:07:13 +00:00
Folkert de Vries
d6feec7735
stdarch-gen-arm: remove lazy_static, use LazyLock instead 2025-07-12 01:02:49 +02:00
Marijn Schouten
a8110072ff thumbv7neon-unknown-linux-gnueabihf clippy fixes 2025-07-11 11:13:13 +00:00
Sayantan Chakraborty
bb7a446c75
Merge pull request #1857 from folkertdev/arm-dup
use `splat` for the aarch64/arm dup intrinsics
2025-07-10 22:40:03 +00:00
Folkert de Vries
6d1f9552bd
use intrinsics::simd for integer max/min 2025-07-10 15:04:13 +02:00
Folkert de Vries
ef048d98ce
use splat for the aarch64/arm dup intrinsics 2025-07-10 12:08:38 +02:00
Folkert de Vries
061a941adc remove unneeded cast 2025-07-08 10:27:34 +00:00
Folkert de Vries
92701fef20 shorten array literals 2025-07-08 10:27:34 +00:00
Folkert de Vries
323c646ec3 remote intermediate assignment 2025-07-08 10:27:34 +00:00
Folkert de Vries
82126a6eba fix whitespace in aarch64.spec.yml 2025-07-08 10:27:34 +00:00
sayantn
658b5c8f69 Use simd_funnel_sh{l,r} and simd_round_ties_even to remove uses of LLVM intrinsics 2025-07-07 23:30:02 +00:00
Marijn Schouten
fddd05bd7f some clippy fixes 2025-07-07 23:28:47 +00:00
sayantn
068cc378a6 Remove uses of deprecated type-specific pointers from ARM 2025-06-02 19:45:08 +00:00
sayantn
5d47941854 Use correct LLVM intrinsic for vmull and vaddv 2025-06-02 19:45:08 +00:00
sayantn
2665fe5729 Use rust intrinsics for more ARM intrinsics 2025-06-02 19:45:08 +00:00
Adam Gemmell
d2587282eb Revert vbsl[q]_f16 to unstable 2025-06-02 18:34:18 +00:00
Folkert de Vries
52115419a3 use simd_bitreverse on aarch64 2025-06-01 22:58:15 +00:00
Tsukasa OI
7168d48c0b stdarch-gen-arm: Modernization of the coding style
It modernizes the coding style of the crate stdarch-gen-arm by fixing
Clippy warnings (except clippy::{collapsible_if,obfuscated_if_else} that
might make the program look worse as a result of "fixing" warnings).

Clippy: rust version 1.89.0-nightly (6f6971078 2025-05-28)
Number of Fixed Warnings: 84/84
Note:
Rust Analyzer double counts one of the Clippy warnings so it reduces
85 warnings (as reported by the Rust Analyzer).

This commit also applies similar technique used to resolve Clippy
warnings but also simplifies identifier name formatting and makes
reading easier.

Confirmed that the exact same code will be generated.
2025-05-31 09:38:49 +00:00
sayantn
cd63f26d86 Upgrade more intrinsics to the new version 2025-05-30 18:02:17 +00:00
James Barford-Evans
c65583c2b3 Pr feedback for instruction & hookup CI for aarch64_be 2025-05-03 05:06:15 +00:00
James Barford-Evans
ef92b59242 fix - aarch64_be tests 2025-05-03 05:06:15 +00:00
sayantn
400dab3df7 Fix stdarch-verify 2025-05-01 11:30:47 +00:00
James Barford-Evans
08b9752ee1 refactor - arm_shared intrinsics are now YAML, where possible use anchor
tags
2025-03-25 10:53:54 +00:00