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

add mips64r6 and mips32r6 as target_arch values #112374

Merged
merged 3 commits into from Jul 18, 2023

Conversation

chenx97
Copy link
Contributor

@chenx97 chenx97 commented Jun 7, 2023

This PR introduces "mips32r6" and "mips64r6" as valid target_arch values, and would be the arch value used by Tier-3 targets mipsisa32r6-unknown-linux-gnu, mipsisa32r6el-unknown-linux-gnu, mipsisa64r6-unknown-linux-gnuabi64 and mipsisa64r6el-unknown-linux-gnuabi64.

This PR was inspired by rustix attempting to link traditional mips64el objects with mips64r6el objects when building for mips64r6, even though rustix recently removed outline assembly support. This is because currently this target's target_arch is "mips64" and rustix has its respective assembly implementation as well as a pre-compiled little-endian static library prepared for mips64el, a tier-2 target with the same target_arch. After some discussions on zulip, I decided to treat mips64r6 as an independent architecture from Rust's POV, since these two architectures are incompatible anyway.

This PR is now waiting for libc to release a new version with support for these target_arch values. It is not expected to introduce changes to any other target, especially Tier-1 and Tier-2 targets.

This PR has its corresponding MCP approved.

@rustbot
Copy link
Collaborator

rustbot commented Jun 7, 2023

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @jackh726 (or someone else) soon.

Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (S-waiting-on-review and S-waiting-on-author) stays updated, invoking these commands when appropriate:

  • @rustbot author: the review is finished, PR author should check the comments and take action accordingly
  • @rustbot review: the author is ready for a review, this PR will be queued again in the reviewer's queue

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Jun 7, 2023
@rustbot
Copy link
Collaborator

rustbot commented Jun 7, 2023

Some changes occurred in compiler/rustc_codegen_cranelift

cc @bjorn3

Some changes occurred in compiler/rustc_codegen_gcc

cc @antoyo

These commits modify compiler targets.
(See the Target Tier Policy.)

The Miri subtree was changed

cc @rust-lang/miri

@WaffleLapkin WaffleLapkin added S-waiting-on-MCP Status: PR has a compiler MCP and is waiting for the compiler MCP to complete. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 8, 2023
@chenx97 chenx97 force-pushed the better-mips64r6 branch 2 times, most recently from 702010a to 9ab4b30 Compare June 11, 2023 12:00
@chenx97
Copy link
Contributor Author

chenx97 commented Jun 15, 2023

@alexcrichton Would you mind offering your review and suggestions for this pull request, since you have reviewed an earlier MIPS R6-related pull request (#90001)?

@alexcrichton
Copy link
Member

Alas sorry but I don't know enough about MIPS to review this.

@bors
Copy link
Contributor

bors commented Jul 10, 2023

☔ The latest upstream changes (presumably #108796) made this pull request unmergeable. Please resolve the merge conflicts.

@bors bors added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Jul 10, 2023
bors added a commit to rust-lang/libc that referenced this pull request Jul 10, 2023
add mips32r6 and mips64r6 target_arch detection

This PR introduces `"mips32r6"` and `"mips64r6"` as valid `target_arch` values, and would be the arch values used by Tier-3 targets `mipsisa32r6-unknown-linux-gnu`, `mipsisa32r6el-unknown-linux-gnu`, `mipsisa64r6-unknown-linux-gnuabi64` and `mipsisa64r6el-unknown-linux-gnuabi64`.

This PR is made for rust-lang/rust#112374.

This PR has a corresponding [MCP](rust-lang/compiler-team#632) waiting for review.

mips64r6 has the same ABIs, syscall conventions, and various magic numbers as mips64 does. So this PR just adds mips64r6 to all mips64 detection macros. Similarly, mips32r6 share their ABIs, syscall conventions and various magic with mips, so the PR just adds mips32r6 to where mips is to be detected.
@chenx97 chenx97 changed the title support for mips64r6 as a target_arch value add mips64r6 and mips32r6 as target_arch values Jul 11, 2023
@jackh726
Copy link
Member

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Jul 18, 2023

📌 Commit d372714 has been approved by jackh726

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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jul 18, 2023
@bors
Copy link
Contributor

bors commented Jul 18, 2023

⌛ Testing commit d372714 with merge 8d361cb...

@bors
Copy link
Contributor

bors commented Jul 18, 2023

☀️ Test successful - checks-actions
Approved by: jackh726
Pushing 8d361cb to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jul 18, 2023
@bors bors merged commit 8d361cb into rust-lang:master Jul 18, 2023
12 checks passed
@rustbot rustbot added this to the 1.73.0 milestone Jul 18, 2023
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (8d361cb): 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)
-2.4% [-2.4%, -2.4%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -2.4% [-2.4%, -2.4%] 1

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: 658.423s -> 658.585s (0.02%)

@chenx97 chenx97 deleted the better-mips64r6 branch July 19, 2023 01:27
bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 25, 2023
…-Simulacrum

Update crates for better MIPS R6 support

Update crates to remove dependency on old versions of rustix and linux-raw-sys. Update libc, rustix, and linux-raw-sys to enhance support for MIPS R6 introduced by rust-lang#112374

Commands that do the update:

```shell
cargo +nightly update tempfile clap
cargo +nightly update linux-raw-sys rustix
```
bors added a commit to rust-lang/rust-analyzer that referenced this pull request Sep 26, 2023
minor: update libc to 0.2.148

This update is a follow-up for [#112374](rust-lang/rust#112374).

The command that does this update:

`cargo update -p libc`
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. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. S-waiting-on-MCP Status: PR has a compiler MCP and is waiting for the compiler MCP to complete. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants