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

Fix asm and global_asm macros #10

Merged
merged 1 commit into from
Feb 25, 2022

Conversation

simonschoening
Copy link
Contributor

The macros are now namespaced:
rust-lang/rust#84019

@wangrunji0408
Copy link
Member

Hi. Thanks for your contribution!
I just enabled CI and it failed on some other targets.
Could you take a look and try to fix them?

@simonschoening
Copy link
Contributor Author

Hi. Thanks for your contribution! I just enabled CI and it failed on some other targets. Could you take a look and try to fix them?

Thanks for your answer!
I have tried to fix some of the issues.
In addition to the namespacing, the llvm_asm macro was also removed:
rust-lang/rust#70173

I replaced it with the asm macro, but I'm not sure whether the implementation is correct.

Comment on lines +16 to +19
asm!(
"mtc0 {trap_entry}, $15, 1",
trap_entry = in(reg) trap_entry,
);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is this correct?

Copy link
Member

Choose a reason for hiding this comment

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

It seems right to me, but I'm not 100% sure. The MIPS target is least used, so maybe we can revisit it in the future.

The macros are now namespaced:
rust-lang/rust#84019

In addition, llvm_asm was removed.
Copy link
Member

@wangrunji0408 wangrunji0408 left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks again!

@wangrunji0408 wangrunji0408 merged commit 61599d3 into rcore-os:master Feb 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants