Rollup of 3 pull requests - #160357
Closed
JonathanBrouwer wants to merge 7 commits into
Closed
Conversation
… r=Amanieu Stabilize passing 128-bit integers via vector registers with `asm!` on x86 tracking issue: rust-lang#133416 reference PR: rust-lang/reference#2313 # Stabilization report ## Summary Stabilize passing 128-bit integers via vector registers with `asm!` on x86 and x86_64: ```rust // Use 128-bit integers with vector registers. let mut v = 0u128; asm!("/* {:x} */", in(xmm_reg) v); asm!("/* {:x} */", out(xmm_reg) v); asm!("/* {:y} */", in(ymm_reg) v); asm!("/* {:y} */", out(ymm_reg) v); asm!("/* {:z} */", in(zmm_reg) v); asm!("/* {:z} */", out(zmm_reg) v); ``` 32-bit and 64-bit integer types can already be passed via vector registers. LLVM has supported 128-bit integers since 2019, see llvm/llvm-project#42502, so `rustc` not supporting them seems like an oversight. This feature is part of [`asm_experimental_reg`](rust-lang#133416). We're not stabilizing that feature as a whole, but only pull out part of it. ## History - rust-lang#151059 ## Open questions None. r? Amanieu
Specialize `advance_by` method of `Fuse` `advance_by` is used a lot internally so it seems important to specialize it.
allocations are allowed to grow (but not shrink) This got permitted on the LLVM side about a year ago (llvm/llvm-project#141338), but didn't require any code changes since LLVM's optimizations were already compatible with growing allocations. That said, LLVM assumes that allocations created via operations it recognizes (e.g. `malloc`, `alloca`, or the Rust global allocator operations) never change their size, so we have to exclude that case. This resolves a part of rust-lang/unsafe-code-guidelines#430. It may seem strange that allocations can grow but not shrink, but we did have multiple users show up in #t-opsem with exactly that request. Cc @nhusung @foonathan; see [here](https://rust-lang.zulipchat.com/#narrow/channel/136281-t-opsem/topic/Shrinking.20allocations.20in-place/near/612181257) and [here](https://rust-lang.zulipchat.com/#narrow/channel/136281-t-opsem/topic/Shrinking.20allocations.20in-place/near/612191402) for some details about their use-cases. Cc @rust-lang/opsem @rust-lang/lang
Contributor
Author
|
@bors r+ rollup=never p=5 |
Contributor
Contributor
|
This pull request was unapproved due to being closed. |
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.
Successful merges:
asm!on x86 #159525 (Stabilize passing 128-bit integers via vector registers withasm!on x86)advance_bymethod ofFuse#160342 (Specializeadvance_bymethod ofFuse)r? @ghost
Create a similar rollup