Add a new wide-arithmetic feature for WebAssembly#132077
Merged
bors merged 1 commit intorust-lang:masterfrom Nov 6, 2024
Merged
Add a new wide-arithmetic feature for WebAssembly#132077bors merged 1 commit intorust-lang:masterfrom
wide-arithmetic feature for WebAssembly#132077bors merged 1 commit intorust-lang:masterfrom
Conversation
Collaborator
Collaborator
|
Some changes occurred in tests/ui/check-cfg cc @Urgau |
Collaborator
|
☔ The latest upstream changes (presumably #131900) made this pull request unmergeable. Please resolve the merge conflicts. |
This commit adds a new rustc target feature named `wide-arithmetic` for WebAssembly targets. This corresponds to the [wide-arithmetic] proposal for WebAssembly which adds new instructions catered towards accelerating integer arithmetic larger than 64-bits. This proposal to WebAssembly is not standard yet so this new feature is flagged as an unstable target feature. Additionally Rust's LLVM version doesn't support this new feature yet since support will first be added in LLVM 20, so the feature filtering logic for LLVM is updated to handle this. I'll also note that I'm not currently planning to add wasm-specific intrinsics to `std::arch::wasm32` at this time. The currently proposed instructions are all accessible through `i128` or `u128`-based operations which Rust already supports, so intrinsic shouldn't be necessary to get access to these new instructions. [wide-arithmetic]: https://github.com/WebAssembly/wide-arithmetic
4854767 to
f534974
Compare
Member
Author
|
ping @estebank, I'm happy to re-roll review here or otherwise seek out a reviewer if you're busy though |
Member
|
I'll take a look. |
jieyouxu
approved these changes
Nov 5, 2024
Member
jieyouxu
left a comment
There was a problem hiding this comment.
Since this is an unstable flag, this LGTM, thanks!
Member
|
@bors r+ rollup |
Collaborator
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Nov 6, 2024
…iaskrgr Rollup of 5 pull requests Successful merges: - rust-lang#131261 (Stabilize `UnsafeCell::from_mut`) - rust-lang#131405 (bootstrap/codegen_ssa: ship llvm-strip and use it for -Cstrip) - rust-lang#132077 (Add a new `wide-arithmetic` feature for WebAssembly) - rust-lang#132562 (Remove the `wasm32-wasi` target from rustc) - rust-lang#132660 (Remove unused errs.rs file) Failed merges: - rust-lang#131721 (Add new unstable feature `const_eq_ignore_ascii_case`) r? `@ghost` `@rustbot` modify labels: rollup
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Nov 6, 2024
Rollup merge of rust-lang#132077 - alexcrichton:wide-arithmetic, r=jieyouxu Add a new `wide-arithmetic` feature for WebAssembly This commit adds a new rustc target feature named `wide-arithmetic` for WebAssembly targets. This corresponds to the [wide-arithmetic] proposal for WebAssembly which adds new instructions catered towards accelerating integer arithmetic larger than 64-bits. This proposal to WebAssembly is not standard yet so this new feature is flagged as an unstable target feature. Additionally Rust's LLVM version doesn't support this new feature yet since support will first be added in LLVM 20, so the feature filtering logic for LLVM is updated to handle this. I'll also note that I'm not currently planning to add wasm-specific intrinsics to `std::arch::wasm32` at this time. The currently proposed instructions are all accessible through `i128` or `u128`-based operations which Rust already supports, so intrinsic shouldn't be necessary to get access to these new instructions. [wide-arithmetic]: https://github.com/WebAssembly/wide-arithmetic
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit adds a new rustc target feature named
wide-arithmeticfor WebAssembly targets. This corresponds to the wide-arithmetic proposal for WebAssembly which adds new instructions catered towards accelerating integer arithmetic larger than 64-bits. This proposal to WebAssembly is not standard yet so this new feature is flagged as an unstable target feature. Additionally Rust's LLVM version doesn't support this new feature yet since support will first be added in LLVM 20, so the feature filtering logic for LLVM is updated to handle this.I'll also note that I'm not currently planning to add wasm-specific intrinsics to
std::arch::wasm32at this time. The currently proposed instructions are all accessible throughi128oru128-based operations which Rust already supports, so intrinsic shouldn't be necessary to get access to these new instructions.