Skip to content

Conversation

linkmauve
Copy link
Contributor

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 to speed up its conversion from f64 to i32, or by any JS engine probably.

I got redirected to this repository from rust-lang/rust#147517

@rustbot
Copy link
Collaborator

rustbot commented Oct 9, 2025

r? @folkertdev

rustbot has assigned @folkertdev.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@folkertdev
Copy link
Contributor

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] ruffle-rs/ruffle#21780
[1] rust-lang/rust#147555
@linkmauve
Copy link
Contributor Author

you also need to enable your new feature here

https://github.com/rust-lang/rust/blob/9725c4baacef19345e13f91b27e66e10ef5592ae/library/stdarch/crates/intrinsic-test/src/arm/config.rs#L124-L125

for the automated testing to work

Oops, thanks for the hint.

Copy link
Contributor

@folkertdev folkertdev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool, thanks!

@folkertdev folkertdev added this pull request to the merge queue Oct 10, 2025
Merged via the queue into rust-lang:master with commit a2725c9 Oct 10, 2025
63 checks passed
@linkmauve linkmauve deleted the fjcvtzs branch October 10, 2025 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants