Skip to content

Add clobber-only register classes for asm! - #86416

Merged
bors merged 2 commits into
rust-lang:masterfrom
Amanieu:asm_clobber_only
Jul 11, 2021
Merged

bors merged 2 commits into
rust-lang:masterfrom
Amanieu:asm_clobber_only

Conversation

@Amanieu

@Amanieu Amanieu commented Jun 17, 2021

Copy link
Copy Markdown
Member

These are needed to properly express a function call ABI using a clobber
list, even though we don't support passing actual values into/out of
these registers.

@rust-highfive

Copy link
Copy Markdown
Contributor

r? @matthewjasper

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 17, 2021
@JohnCSimon JohnCSimon added F-rust_2018_preview `#![feature(rust_2018_preview)]` S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. F-rust_2018_preview `#![feature(rust_2018_preview)]` labels Jul 6, 2021
@Amanieu

Amanieu commented Jul 7, 2021

Copy link
Copy Markdown
Member Author

r? @nagisa

@rust-highfive rust-highfive assigned nagisa and unassigned matthewjasper Jul 7, 2021
Comment thread compiler/rustc_ast_lowering/src/asm.rs Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not following what purpose the matches!(reg, asm::InlineAsmRegOrRegClass::RegClass(_)) part is serving. Could you explain and/or add a comment?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I understand this correctly, the addition of z registers is not strictly related to the clobber-only register classes, correct? While related to the p registers, I don't believe p registers are required to utilize the z registers, right?

If that's the case, could this become a separate commit?

@nagisa nagisa added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 10, 2021
Amanieu added 2 commits July 10, 2021 17:29
These are needed to properly express a function call ABI using a clobber
list, even though we don't support passing actual values into/out of
these registers.
@Amanieu
Amanieu force-pushed the asm_clobber_only branch from 5ede032 to d2a1d04 Compare July 10, 2021 15:29
@Amanieu Amanieu added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jul 10, 2021
@nagisa

nagisa commented Jul 10, 2021

Copy link
Copy Markdown
Member

@bors r+ Thanks!

@bors

bors commented Jul 10, 2021

Copy link
Copy Markdown
Contributor

📌 Commit d2a1d04 has been approved by nagisa

@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 Jul 10, 2021
@bors

bors commented Jul 11, 2021

Copy link
Copy Markdown
Contributor

⌛ Testing commit d2a1d04 with merge 99f8efe...

@bors

bors commented Jul 11, 2021

Copy link
Copy Markdown
Contributor

☀️ Test successful - checks-actions
Approved by: nagisa
Pushing 99f8efe to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jul 11, 2021
@bors
bors merged commit 99f8efe into rust-lang:master Jul 11, 2021
@rustbot rustbot added this to the 1.55.0 milestone Jul 11, 2021
N1ark pushed a commit to N1ark/reference that referenced this pull request Nov 26, 2026
On AArch64, we've accepted `z0`, `z1`, etc. as names for the `v`
registers since inline assembly was stabilized in Rust 1.59.  We've
accepted these for Arm64EC since it was stabilized in Rust 1.84.

But our table of register aliases doesn't list these aliases.  Let's
add them.

(We added these aliases in rust-lang/rust#86416.)
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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants