Rollup of 11 pull requests#156679
Closed
JonathanBrouwer wants to merge 28 commits into
Closed
Conversation
In the future this can be used by build-std, but until then it is still useful for allowing rust-analyzer to work offline. This increases the unpacked size by 24MB (from 116MB to 140MB) and the compressed size by only 2MB (from 18MB to 20MB)
Add support for inline assembly for the amdgpu backend (the amdgcn-amd-amdhsa target). Add register classes for `vgpr` (vector general purpose register) and `sgpr` (scalar general purpose register). The LLVM backend supports two more classes, `reg`, which is either VGPR or SGPR, up to the compiler to decide. As instructions often rely on a register being either a VGPR or SGPR for the assembly to be valid, reg doesn’t seem that useful (I struggled to write correct tests for it), so I didn’t end up adding it. The fourth register class is AGPRs, which only exist on some hardware versions (not the consumer ones) and they have restricted ways to write and read from them, which makes it hard to write a Rust variable into them. They could be used inside assembly blocks, but I didn’t add them as Rust register class. There is one change affecting general inline assembly code, that is `InlineAsmReg::name()` now returns a `Cow` instead of a `&'static str`. Because amdgpu has many registers, 256 VGPRs plus combinations of 2 or 4 VGPRs, and I didn’t want to list hundreds of static strings, the amdgpu reg stores the register number(s) and a non-static String is generated at runtime for the register name.
Use just two variants for SGPRs and VGPRs, each with an int for the register size in bits.
Remove support for 64-bit vector types to make it simpler.
There is no reference to `char` in c_short.md
The documentation for the `format_into` methods on unsigned integers still said "in signed decimal format". Change them to say "unsigned".
…acrum Include vendored sources in the rust-src component In the future this can be used by build-std, but until then it is still useful for allowing rust-analyzer to work offline. This increases the unpacked size by 24MB (from 116MB to 140MB) and the compressed size by only 2MB (from 18MB to 20MB)
Add inline asm support for amdgpu Add support for inline assembly for the amdgpu backend (the amdgcn-amd-amdhsa target). Add register classes for `vgpr` (vector general purpose register) and `sgpr` (scalar general purpose register). The LLVM backend supports two more classes, `reg`, which is either VGPR or SGPR, up to the compiler to decide. As instructions often rely on a register being either a VGPR or SGPR for the assembly to be valid, reg doesn’t seem that useful (I struggled to write correct tests for it), so I didn’t end up adding it. The fourth register class is AGPRs, which only exist on some hardware versions (not the consumer ones) and they have restricted ways to write and read from them, which makes it hard to write a Rust variable into them. They could be used inside assembly blocks, but I didn’t add them as Rust register class. There is one change affecting general inline assembly code, that is `InlineAsmReg::name()` now returns a `Cow` instead of a `&'static str`. Because amdgpu has many registers, 256 VGPRs plus combinations of 2 or 4 VGPRs, and I didn’t want to list hundreds of static strings, the amdgpu reg stores the register number(s) and a non-static String is generated at runtime for the register name. Tracking issue: rust-lang#135024
remove/update various cfg(miri) I went over all `cfg(miri)` in `library/`. Most of the things I noticed have become separate PRs; these here are the few remaining scattered little fixes in various places.
Fix missing period in Iterator product doc comment It looks like the other doc comments all end with a period.
std: replace "safe" with "sound" in safety documentation - `env::set_var` - `env::remove_var` Context: rust-lang#124636
…JonathanBrouwer,mu001999 Support defaults for static EIIs Tracking issue: rust-lang#125418 rust-lang#154193 added EII support for statics, but left default implementations for "a followup PR". This PR implements it. Maybe I should remove `no-prefer-dynamic` if rust-lang#156577 is accepted.
…Sapin c ffi document fixes for c_short.md There is no reference to `char` in c_short.md
…imonSapin library: Fix std compilation for espidf target in unix::process Fixes a regression on the riscv32imac-esp-espidf target caused by commit 7bf5fe7 (linked issue rust-lang#156537) . The unix_kill_process_group feature attempts to use libc::SIGKILL, which is not supported on the espidf target. Discussed in `esp-idf-sys` issue: esp-rs/esp-idf-sys#419
…monSapin Change division to multiplication in floating-point midpoint Multiplication is faster than division on most (all?) platforms. While the optimizer will handle this, there is really no point in relying on that. Using multiplication directly will not have any drawbacks and are numerically identical (in this case since 1.0 / 2.0 == 0.5) Consider the examples at https://godbolt.org/z/oMvb9vobG where it is clear that the non-optimized version uses division, while the optimized version uses multiplication.
…imonSapin Fix typo in `format_into` docs: signed -> unsigned The documentation for the `format_into` methods on unsigned integers still said "in signed decimal format". Change them to say "unsigned".
change `other uses of const` to `raw pointers` in const keyword docs this section only talks about how `const` is used in raw pointers and doesn't give any other uses, so in my opinion it would be a bit clearer if the section was named `raw pointers` or something similar.
Contributor
Author
Contributor
This comment has been minimized.
This comment has been minimized.
rust-bors Bot
pushed a commit
that referenced
this pull request
May 17, 2026
Rollup of 11 pull requests try-job: dist-various-1 try-job: test-various try-job: x86_64-gnu-aux try-job: x86_64-gnu-llvm-21-3 try-job: x86_64-msvc-1 try-job: aarch64-apple try-job: x86_64-mingw-1 try-job: i686-msvc-2
Collaborator
|
The job Click to see the possible cause of the failure (guessed by this bot) |
Contributor
|
💔 Test for d4f4f2b failed: CI. Failed jobs:
|
Contributor
|
PR #156583, which is a member of this rollup, was unapproved. This rollup was thus unapproved. |
Contributor
|
PR #149793, which is a member of this rollup, was unapproved. |
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:
format_intodocs: signed -> unsigned #156668 (Fix typo informat_intodocs: signed -> unsigned)other uses of consttoraw pointersin const keyword docs #156677 (changeother uses of consttoraw pointersin const keyword docs)r? @ghost
Create a similar rollup