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

Use llvm_asm! instead of deprecated asm! #108

Merged
merged 2 commits into from Apr 26, 2020

Conversation

kennystrawnmusic
Copy link
Contributor

@kennystrawnmusic kennystrawnmusic commented Apr 25, 2020

Fixes #107

This potentially breaks users on older nightlies.

Using pull request to make Phil's job a bit easier
@kennystrawnmusic kennystrawnmusic changed the title Fix Issue #14 Fix Issue #107 Apr 25, 2020
Forgot to update feature gate to match macro change
@phil-opp phil-opp changed the title Fix Issue #107 Use llvm_asm! instead of deprecated asm! Apr 26, 2020
Copy link
Member

@phil-opp phil-opp left a comment

Thank you!

@phil-opp phil-opp merged commit 5b80665 into rust-osdev:master Apr 26, 2020
7 checks passed
phil-opp added a commit that referenced this pull request Apr 26, 2020
@phil-opp
Copy link
Member

phil-opp commented Apr 26, 2020

Published as v0.9.2

vinaychandra pushed a commit to vinaychandra/bootloader that referenced this pull request May 25, 2020
vinaychandra pushed a commit to vinaychandra/bootloader that referenced this pull request May 25, 2020
@qiujiangkun
Copy link

qiujiangkun commented Oct 31, 2021

   Compiling bootloader v0.9.19 (/Users/jack/.cargo/registry/src/github.com-1ecc6299db9ec823/bootloader-0.9.19)
warning: use of deprecated macro `llvm_asm`: will be removed from the compiler, use asm! instead
  --> src/main.rs:45:5
   |
45 |     llvm_asm!("call $1; ${:private}.spin.${:uid}: jmp ${:private}.spin.${:uid}" ::
   |     ^^^^^^^^
   |
   = note: `#[warn(deprecated)]` on by default

warning: use of deprecated macro `llvm_asm`: will be removed from the compiler, use asm! instead
  --> src/main.rs:91:5
   |
91 |     llvm_asm!("mov bx, 0x0
   |     ^^^^^^^^

warning: `bootloader` (bin "bootloader") generated 2 warnings

Why is this happening?

@bjorn3
Copy link
Contributor

bjorn3 commented Oct 31, 2021

llvm_asm!() is now deprecated. In it's place a new asm!() syntax has been created. The original asm!() macro was renamed to llvm_asm!() before the new asm!() macro was introduced. Basically the migration path from the old to the new asm syntax is: asm!() renamed to llvm_asm!(). New asm!() introduced. llvm_asm!() deprecated. (current step) And then in the future removing llvm_asm!(). Bootloader will need to be updated to the new asm!() syntax before the old syntax is removed. This has already been done for the 0.10 series in #154, but the 0.9 series still uses llvm_asm!().

@kennystrawnmusic kennystrawnmusic deleted the patch-1 branch Feb 4, 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.

Deprecation: asm! > llvm_asm!
4 participants