Skip to content

Add MSA and f16 inline ASM support for MIPS - #160851

Open
beetrees wants to merge 1 commit into
rust-lang:mainfrom
beetrees:f16-inline-asm-mips
Open

Add MSA and f16 inline ASM support for MIPS#160851
beetrees wants to merge 1 commit into
rust-lang:mainfrom
beetrees:f16-inline-asm-mips

Conversation

@beetrees

@beetrees beetrees commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

This PR adds vector register support for MIPS inline ASM when using the MSA extension (MSA specification), as well as adding support for the f16 type.

Ping target maintainers of MIPS targets: @Itus-Shield @Gelbpunkt @ayrtonm @LukasWoodtli @wzssyqa @chenx97 @709924470 @Cyanoxygen @Fearyncess

Tracking issues:
f16 inline ASM: #125398 (part of #116909)
MIPS inline ASM: #93335
MIPS target features: #150253

@rustbot rustbot added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. 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. labels Aug 10, 2026
@rustbot

rustbot commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator

r? @JohnTitor

rustbot has assigned @JohnTitor.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: compiler
  • compiler expanded to 75 candidates
  • Random selection from 18 candidates

@rust-log-analyzer

This comment has been minimized.

@beetrees
beetrees force-pushed the f16-inline-asm-mips branch from ce8eb57 to 592a2ea Compare August 10, 2026 12:14
@rustbot

rustbot commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator

rustc_codegen_gcc is developed in its own repository. If possible, consider making this change to rust-lang/rustc_codegen_gcc instead.

cc @antoyo, @GuillaumeGomez

@rust-log-analyzer

This comment has been minimized.

@folkertdev folkertdev left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

r? me

Looks good overall, some small things. I'd like to hear from the target maintainers too.

View changes since this review

Comment thread compiler/rustc_target/src/asm/mips.rs Outdated
}
$(Self::$field)|* => {
cb(Self::$full);
cb(self);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

what does this do? it seems to say that a register overlaps with itself?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hmm apparently we're a bit inconsistent here, some of the macros do include the field itself, others don't seem to.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I think having the cb(self) separate from the macro is more readable, so I've changed it to use that here.

Comment thread compiler/rustc_target/src/asm/mips.rs
Comment thread tests/assembly-llvm/asm/mips-types.rs
Comment thread tests/assembly-llvm/asm/mips-types.rs
@rustbot rustbot assigned folkertdev and unassigned JohnTitor Aug 12, 2026
@rustbot rustbot 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 Aug 12, 2026
@rustbot

rustbot commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

Reminder, once the PR becomes ready for a review, use @rustbot ready.

@beetrees
beetrees force-pushed the f16-inline-asm-mips branch from f8f3913 to 5113ee9 Compare August 13, 2026 17:48
@beetrees

Copy link
Copy Markdown
Contributor Author

@rustbot ready

@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 Aug 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants