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 asm! support for mips64 #77337

Merged
merged 4 commits into from
Oct 10, 2020
Merged

Add asm! support for mips64 #77337

merged 4 commits into from
Oct 10, 2020

Conversation

tesuji
Copy link
Contributor

@tesuji tesuji commented Sep 29, 2020

  • Updated src/doc/unstable-book/src/library-features/asm.md.
  • No vector type support. I don't know much about those types.

cc #76839

@jyn514 jyn514 added A-inline-assembly Area: Inline assembly (`asm!(…)`) F-asm `#![feature(asm)]` (not `llvm_asm`) O-MIPS Target: MIPS processors labels Sep 29, 2020
@tesuji tesuji force-pushed the asm-mips64 branch 2 times, most recently from c9140cb to 4fde576 Compare September 30, 2020 10:43
@tesuji tesuji marked this pull request as ready for review September 30, 2020 11:00
@tesuji
Copy link
Contributor Author

tesuji commented Sep 30, 2020

@rustbot modify labels: -S-waiting-on-author +S-waiting-on-review

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 30, 2020
compiler/rustc_target/src/asm/mips.rs Outdated Show resolved Hide resolved
src/test/assembly/asm/mips64-types.rs Outdated Show resolved Hide resolved
compiler/rustc_codegen_llvm/src/asm.rs Outdated Show resolved Hide resolved
@Amanieu Amanieu 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 Sep 30, 2020
@tesuji
Copy link
Contributor Author

tesuji commented Oct 1, 2020

Please tell me to git squash before merging!

@rustbot rustbot 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 Oct 1, 2020
compiler/rustc_target/src/asm/mips.rs Outdated Show resolved Hide resolved
Self::reg => types! { _: I8, I16, I32, F32; },
Self::freg => types! { _: F32; },
match (self, arch) {
(Self::reg, InlineAsmArch::Mips64) => types! { _: I8, I16, I32, I64, F32; },
Copy link
Member

Choose a reason for hiding this comment

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

You should be able to support F64 here with the same bitcast adjustment you did for F32.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Since we have hard-float by default for mips, I don't know how people enable soft-float FPU.
Is it important to support those operations ?

Copy link
Member

Choose a reason for hiding this comment

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

It's just for consistency since all the other architectures support FP values in integer registers.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmm, I added it then. Although I don't know how useful they are.

@Amanieu
Copy link
Member

Amanieu commented Oct 3, 2020

LGTM

co-authored-by: Amanieu <amanieu@gmail.com>
@tesuji
Copy link
Contributor Author

tesuji commented Oct 4, 2020

rebased.

@Amanieu
Copy link
Member

Amanieu commented Oct 4, 2020

@bors r+

@bors
Copy link
Contributor

bors commented Oct 4, 2020

📌 Commit f1d9b514471c47da029dbf0ac548a7b22b45e5f7 has been approved by Amanieu

@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 Oct 4, 2020
@tesuji
Copy link
Contributor Author

tesuji commented Oct 4, 2020

Sorry, I didn't split "Add asm! support for mips64" and "Removes reg aliases since there are many ABIs: o32/n32/n64"
cleanly. Should be good now.

@rustbot modify labels: -S-waiting-on-author +S-waiting-on-review

@bors bors 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-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Oct 4, 2020
@rustbot rustbot 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 Oct 4, 2020
@Amanieu
Copy link
Member

Amanieu commented Oct 10, 2020

@bors r+

@bors
Copy link
Contributor

bors commented Oct 10, 2020

📌 Commit 4d570fb has been approved by Amanieu

@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 Oct 10, 2020
@bors
Copy link
Contributor

bors commented Oct 10, 2020

⌛ Testing commit 4d570fb with merge 7bc5839...

@bors
Copy link
Contributor

bors commented Oct 10, 2020

☀️ Test successful - checks-actions, checks-azure
Approved by: Amanieu
Pushing 7bc5839 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Oct 10, 2020
@bors bors merged commit 7bc5839 into rust-lang:master Oct 10, 2020
@rustbot rustbot added this to the 1.49.0 milestone Oct 10, 2020
@tesuji tesuji deleted the asm-mips64 branch October 11, 2020 01:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-inline-assembly Area: Inline assembly (`asm!(…)`) F-asm `#![feature(asm)]` (not `llvm_asm`) merged-by-bors This PR was explicitly merged by bors. O-MIPS Target: MIPS processors 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.

5 participants