Skip to content
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 4 pull requests #118370

Merged
merged 8 commits into from
Nov 27, 2023
Merged

Rollup of 4 pull requests #118370

merged 8 commits into from
Nov 27, 2023

Conversation

TaKO8Ki
Copy link
Member

@TaKO8Ki TaKO8Ki commented Nov 27, 2023

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

jonathanpallant and others added 8 commits November 20, 2023 16:25
Arm Cortex-A53 CPUs have an errata related to a specific sequence of instructions - errata number 843419 (https://documentation-service.arm.com/static/5fa29fddb209f547eebd361d). There is a mitigation that can be applied at link-time which detects the when sequence of instructions exists at a specific alignment. When detected, the linker re-writes those instructions and either changes an ADRP to an ADR, or bounces to a veneer to break the sequence.

The linker argument to enable the mitigation is "--fix-cortex-a53-843419", and this is supported by GNU ld and LLVM lld. The gcc argument to enable the flag is "-mfix-cortex-a53-843419".

Because the aarch64-unknown-none target uses rust-lld directly, this patch causes rustc to emit the "--fix-cortex-a53-843419" argument when calling the linker, just like aarch64-linux-gnu-gcc on Ubuntu 22.04 does.

Failure to enable this mitigation in the linker can cause the production of instruction sequences that do not execute correctly on Arm Cortex-A53.
…davidtwco

Enable the Arm Cortex-A53 errata mitigation on aarch64-unknown-none

Arm Cortex-A53 CPUs have an errata related to a specific sequence of instructions - errata number 843419 (https://documentation-service.arm.com/static/5fa29fddb209f547eebd361d). There is a mitigation that can be applied at link-time which detects the when sequence of instructions exists at a specific alignment. When detected, the linker re-writes those instructions and either changes an ADRP to an ADR, or bounces to a veneer to break the sequence.

The linker argument to enable the mitigation is "--fix-cortex-a53-843419", and this is supported by GNU ld and LLVM lld. The gcc argument to enable the flag is "-mfix-cortex-a53-843419".

Because the aarch64-unknown-none target uses rust-lld directly, this patch causes rustc to emit the "--fix-cortex-a53-843419" argument when calling the linker, just like aarch64-linux-gnu-gcc on Ubuntu 22.04 does.

Failure to enable this mitigation in the linker can cause the production of instruction sequences that do not execute correctly on Arm Cortex-A53.
Use helper functions in `pretty.rs` instead of accessing the `Cell`s manually

Pulled this out of another PR that I never landed.
make const tests independent of std debug assertions

Fixes some fallout from rust-lang#110303: `ignore-debug` is bad since it makes it very annoying to develop rustc with debug assertions enabled.

These tests do not really provide any interesting test coverage, we already got plenty of other tests that check that we detect invalid enums. So we can just remove them.
…O8Ki

Suggest swapping the order of `ref` and `box`

It is not valid grammar to write `ref box <ident>` in patterns, but `box ref <ident>` is.
This patch adds a diagnostic to suggest swapping them, analogous to what we do for `mut let`.
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Nov 27, 2023
@TaKO8Ki
Copy link
Member Author

TaKO8Ki commented Nov 27, 2023

@bors r+ rollup=never p=4

@bors
Copy link
Contributor

bors commented Nov 27, 2023

📌 Commit 215d84a has been approved by TaKO8Ki

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 27, 2023
@bors
Copy link
Contributor

bors commented Nov 27, 2023

⌛ Testing commit 215d84a with merge 9f15a88...

@bors
Copy link
Contributor

bors commented Nov 27, 2023

☀️ Test successful - checks-actions
Approved by: TaKO8Ki
Pushing 9f15a88 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Nov 27, 2023
@bors bors merged commit 9f15a88 into rust-lang:master Nov 27, 2023
12 checks passed
@rustbot rustbot added this to the 1.76.0 milestone Nov 27, 2023
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#118095 Enable the Arm Cortex-A53 errata mitigation on aarch64-unkn… 4a651f3f32a5d87699dc48ba6501e592f30cd82b (link)
#118340 Use helper functions in pretty.rs instead of accessing th… 5eb606534aa329bc6634be6dcadc23968b28adc8 (link)
#118358 make const tests independent of std debug assertions 8de9fac3df9b3c6bb22780a5f17d427362c1f4a2 (link)
#118359 Suggest swapping the order of ref and box 277a55788b5d2ac06a4e50d4d5b571c6c05059d6 (link)

previous master: aa330518f4

In the case of a perf regression, run the following command for each PR you suspect might be the cause: @rust-timer build $SHA

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (9f15a88): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results

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.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-1.0% [-1.0%, -1.0%] 1
All ❌✅ (primary) - - 0

Cycles

This benchmark run did not return any relevant results for this metric.

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 675.406s -> 676.072s (0.10%)
Artifact size: 313.35 MiB -> 313.34 MiB (-0.01%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. rollup A PR which is a rollup S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants