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

Replace legacy asm! macro with llvm_asm! #10

Merged
merged 1 commit into from
Jul 10, 2020
Merged

Conversation

onehr
Copy link
Contributor

@onehr onehr commented Jul 10, 2020

  • Platform
    Linux 5.4.0-7634-generic SMP Fri Jun 19 22:43:37 UTC x86_64 x86_64 x86_64 GNU/Linux
    rustc 1.46.0-nightly (2020-06-29)
  • Issue
...
error: the legacy LLVM-style asm! syntax is no longer supported
   --> kernel/src/mem.rs:199:9
    |
199 |         asm!("csrw satp, $0" :: "r"(satp_val));
    |         ----^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |         |
    |         help: replace with: `llvm_asm!`
    |
    = note: consider migrating to the new asm! syntax specified in RFC 2873
    = note: alternatively, switch to llvm_asm! to keep your code working as it is
...

The existing asm! macro will be renamed to llvm_asm! to provide an
easy way to maintain backwards-compatibility with existing code using
inline asm.

From [RFC 2873](rust-lang/rfcs#2873):

> The existing `asm!` macro will be renamed to `llvm_asm!` to provide an
easy way to maintain backwards-compatibility with existing code using
inline asm.
Copy link
Owner

@skyzh skyzh left a comment

Choose a reason for hiding this comment

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

Thanks!

@skyzh skyzh merged commit 97653ed into skyzh:master Jul 10, 2020
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