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

Deprecation: asm! > llvm_asm! #107

Closed
kennystrawnmusic opened this issue Apr 25, 2020 · 2 comments · Fixed by #108
Closed

Deprecation: asm! > llvm_asm! #107

kennystrawnmusic opened this issue Apr 25, 2020 · 2 comments · Fixed by #108

Comments

@kennystrawnmusic
Copy link
Contributor

Should be a pretty simple problem to fix, but as of 24 April 2020, use of the asm! macro is triggering multiple deprecation warnings:

warning: use of deprecated item 'asm': the syntax of asm! will change soon, use llvm_asm! to avoid breakage
  --> src/main.rs:46:5
   |
46 |     asm!("call $1; ${:private}.spin.${:uid}: jmp ${:private}.spin.${:uid}" ::
   |     ^^^ help: replace the use of the deprecated item: `llvm_asm`
   |
   = note: `#[warn(deprecated)]` on by default

warning: use of deprecated item 'asm': the syntax of asm! will change soon, use llvm_asm! to avoid breakage
  --> src/main.rs:92:5
   |
92 |     asm!("mov bx, 0x0
   |     ^^^ help: replace the use of the deprecated item: `llvm_asm`

Should be an easy fix if you ask me ― since there's probably a lot more instances than those two, is this being worked on already?

kennystrawnmusic added a commit to kennystrawnmusic/bootloader that referenced this issue Apr 25, 2020
Forgot to update feature gate to match macro change
@kennystrawnmusic
Copy link
Contributor Author

Pull Request #108 includes a fix for this.

@TzviPM
Copy link

TzviPM commented Sep 19, 2021

Hmm... Current nightly is giving me the opposite issue right now:

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

Looks like x86_64 updated to use asm! as well: rust-osdev/x86_64#164

My understanding is that asm! was renamed to llvm_asm! as an intermediate step to keep it as a legacy API, but there is a new asm! macro that should be used.

SlyMarbo added a commit to ProjectSerenity/firefly that referenced this issue Nov 8, 2021
The various changes over the last year or so broke testing with
cargo xtest, but we can now use cargo test instead.

Note that we had to remove the (admittedly redundant) declarations
of `panic = "abort"` in both `dev` and `release` profiles in
Cargo.toml, thanks to rust-lang/cargo#7359.

The only thing left is the repeated deprecation warning from
bootloader, tracked in rust-osdev/bootloader#107,
which needs to be reopend at time of writing.
SlyMarbo added a commit to ProjectSerenity/firefly that referenced this issue Nov 8, 2021
The various changes over the last year or so broke testing with
cargo xtest, but we can now use cargo test instead.

Note that we had to remove the (admittedly redundant) declarations
of `panic = "abort"` in both `dev` and `release` profiles in
Cargo.toml, thanks to rust-lang/cargo#7359.

The only thing left is the repeated deprecation warning from
bootloader, tracked in rust-osdev/bootloader#107,
which needs to be reopend at time of writing.
SlyMarbo added a commit to ProjectSerenity/firefly that referenced this issue Feb 10, 2022
The various changes over the last year or so broke testing with
cargo xtest, but we can now use cargo test instead.

Note that we had to remove the (admittedly redundant) declarations
of `panic = "abort"` in both `dev` and `release` profiles in
Cargo.toml, thanks to rust-lang/cargo#7359.

The only thing left is the repeated deprecation warning from
bootloader, tracked in rust-osdev/bootloader#107,
which needs to be reopend at time of writing.

Signed-off-by: SlyMarbo <the.sly.marbo@googlemail.com>
SlyMarbo added a commit to ProjectSerenity/firefly that referenced this issue Feb 11, 2022
The various changes over the last year or so broke testing with
cargo xtest, but we can now use cargo test instead.

Note that we had to remove the (admittedly redundant) declarations
of `panic = "abort"` in both `dev` and `release` profiles in
Cargo.toml, thanks to rust-lang/cargo#7359.

The only thing left is the repeated deprecation warning from
bootloader, tracked in rust-osdev/bootloader#107,
which needs to be reopend at time of writing.

Signed-off-by: SlyMarbo <the.sly.marbo@googlemail.com>
SlyMarbo added a commit to ProjectSerenity/firefly that referenced this issue Feb 11, 2022
The various changes over the last year or so broke testing with
cargo xtest, but we can now use cargo test instead.

Note that we had to remove the (admittedly redundant) declarations
of `panic = "abort"` in both `dev` and `release` profiles in
Cargo.toml, thanks to rust-lang/cargo#7359.

The only thing left is the repeated deprecation warning from
bootloader, tracked in rust-osdev/bootloader#107,
which needs to be reopend at time of writing.

Signed-off-by: SlyMarbo <the.sly.marbo@googlemail.com>
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 a pull request may close this issue.

2 participants