-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rollup of 7 pull requests #133568
Rollup of 7 pull requests #133568
Conversation
use intra-doc links so there'll be a doc gen fail next time this becomes wrong
Don't type error if we fail to coerce `Pin<T>` because it doesnt contain a ref Fixes rust-lang#133222. Also moves some tests into a directory for better bookkeeping. r? eholk or re-roll
…nieu Fix clobber_abi in RV32E and RV64E inline assembly Currently clobber_abi in RV32E and RV64E inline assembly is implemented using InlineAsmClobberAbi::RiscV, but broken since x16-x31 cannot be used in RV32E and RV64E. ``` error: cannot use register `x16`: register can't be used with the `e` target feature --> <source>:42:14 | 42 | asm!("", clobber_abi("C"), options(nostack, nomem, preserves_flags)); | ^^^^^^^^^^^^^^^^ error: cannot use register `x17`: register can't be used with the `e` target feature --> <source>:42:14 | 42 | asm!("", clobber_abi("C"), options(nostack, nomem, preserves_flags)); | ^^^^^^^^^^^^^^^^ error: cannot use register `x28`: register can't be used with the `e` target feature --> <source>:42:14 | 42 | asm!("", clobber_abi("C"), options(nostack, nomem, preserves_flags)); | ^^^^^^^^^^^^^^^^ error: cannot use register `x29`: register can't be used with the `e` target feature --> <source>:42:14 | 42 | asm!("", clobber_abi("C"), options(nostack, nomem, preserves_flags)); | ^^^^^^^^^^^^^^^^ error: cannot use register `x30`: register can't be used with the `e` target feature --> <source>:42:14 | 42 | asm!("", clobber_abi("C"), options(nostack, nomem, preserves_flags)); | ^^^^^^^^^^^^^^^^ error: cannot use register `x31`: register can't be used with the `e` target feature --> <source>:42:14 | 42 | asm!("", clobber_abi("C"), options(nostack, nomem, preserves_flags)); | ^^^^^^^^^^^^^^^^ ``` r? `@Amanieu` `@rustbot` label O-riscv +A-inline-assembly
Support predicate registers (clobber-only) in Hexagon inline assembly The result of the Hexagon instructions such as comparison, store conditional, etc. is stored in predicate registers (`p[0-3]`), but currently there is no way to mark it as clobbered in `asm!`. This is also needed for `clobber_abi` (although implementing `clobber_abi` will require the addition of support for [several more register classes](https://github.com/llvm/llvm-project/blob/llvmorg-19.1.0/llvm/lib/Target/Hexagon/HexagonRegisterInfo.cpp#L71-L90). see also rust-lang#93335 (comment)). Refs: - [Section 6 "Conditional Execution" in Qualcomm Hexagon V73 Programmer’s Reference Manual](https://docs.qualcomm.com/bundle/publicresource/80-N2040-53_REV_AB_Qualcomm_Hexagon_V73_Programmers_Reference_Manual.pdf#page=90) - [Register definition in LLVM](https://github.com/llvm/llvm-project/blob/llvmorg-19.1.0/llvm/lib/Target/Hexagon/HexagonRegisterInfo.td#L155) cc `@androm3da` (target maintainer of hexagon-unknown-{[none-elf](https://doc.rust-lang.org/nightly/rustc/platform-support/hexagon-unknown-none-elf.html#target-maintainers),[linux-musl](https://doc.rust-lang.org/nightly/rustc/platform-support/hexagon-unknown-linux-musl.html#target-maintainers)}) r? `@Amanieu` `@rustbot` label +A-inline-assembly (Currently there is no O-hexagon label...)
Fix handling of x18 in AArch64 inline assembly on ohos/trusty or with -Zfixed-x18 Currently AArch64 inline assembly allows using x18 on ohos/trusty or with -Zfixed-x18. https://github.com/rust-lang/rust/blob/7db7489f9bc274cb60c4956bfa56de0185eb1b9b/compiler/rustc_target/src/asm/aarch64.rs#L74-L76 However, x18 is reserved in these environments and should not be allowed in the input/output operands of inline assemblies as it is in Android, Windows, etc.. https://github.com/rust-lang/rust/blob/7db7489f9bc274cb60c4956bfa56de0185eb1b9b/compiler/rustc_target/src/spec/targets/aarch64_unknown_linux_ohos.rs#L19 https://github.com/rust-lang/rust/blob/7db7489f9bc274cb60c4956bfa56de0185eb1b9b/compiler/rustc_target/src/spec/targets/aarch64_unknown_trusty.rs#L18 https://github.com/rust-lang/rust/blob/7db7489f9bc274cb60c4956bfa56de0185eb1b9b/compiler/rustc_codegen_llvm/src/llvm_util.rs#L764-L771 (As for ohos, +reserve-x18 is [redundant](llvm/llvm-project@c417b7a#diff-0ddf23e0bf2b28b2d05f842f087d1e6f694e8e06d1765e8d0f10d47fddcdff9c) since rust-lang@7a966b9 that starting using llvm's ohos targets. So removed it from target-spec.) This fix may potentially break the code for tier 2 target (aarch64-unknown-linux-ohos). (As for others, aarch64-unknown-trusty is tier 3 and -Zfixed-x18 is unstable so breaking them should be fine.) However, in any case, it seems suspicious that the code that is broken by this was sound. r? `@Amanieu` `@rustbot` label O-AArch64 +A-inline-assembly
…ee1-dead fix confusing diagnostic for reserved `##` Closes rust-lang#131615
Small doc fixes in `rustc_codegen_ssa` I'm trying to make a toy codegen backend for `rustc`, and I got confused for a few minutes about what `codegen_backend` was referring to in the `CodegenBackend::join_codegen` docs. Experimentally, it looks like the result of `CodegenBackend::codegen_crate` is passed to `CodegenBackend::join_codegen`, so this updates the docs to refer to that. This time using intra-doc links to hopefully cause people to notice if that gets out of date again. Also, added another intra-doc link nearby, on `CodegenBackend::link`, for the same reason.
Trim extra space in 'repeated `mut`' diagnostic Trim an extra space when removing repeated `mut`. Also an extra test for even more repeated `mut`s
@bors r+ p=7 rollup=never |
☀️ Test successful - checks-actions |
📌 Perf builds for each rolled up PR:
previous master: c1cfab230e In the case of a perf regression, run the following command for each PR you suspect might be the cause: |
Finished benchmarking commit (9b4d7c6): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)Results (secondary -2.8%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 793.251s -> 791.695s (-0.20%) |
Successful merges:
Pin<T>
because it doesnt contain a ref #133358 (Don't type error if we fail to coercePin<T>
because it doesnt contain a ref)##
#133487 (fix confusing diagnostic for reserved##
)rustc_codegen_ssa
#133557 (Small doc fixes inrustc_codegen_ssa
)mut
' diagnostic #133560 (Trim extra space in 'repeatedmut
' diagnostic)r? @ghost
@rustbot modify labels: rollup
Create a similar rollup