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

Migrate code to new asm! syntax #1

Closed
dreamer opened this issue Oct 4, 2020 · 2 comments · Fixed by #2
Closed

Migrate code to new asm! syntax #1

dreamer opened this issue Oct 4, 2020 · 2 comments · Fixed by #2
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed

Comments

@dreamer
Copy link

dreamer commented Oct 4, 2020

I was hoping to experiment with this repo a little bit to see if I could use Rust for implementing new built-in DOS commands for dosbox-staging, but ATM it does not compile.

Nightly transitioned to new asm! syntax; old syntax can still be used via llvm_asm! (but somehow it does not work for me), but perhaps it would be better to move to new syntax right away.

rust-lang/rust#70173
rust-lang/rust#68404

Right now, the code fails to compile with several errors like this one:

error: the legacy LLVM-style asm! syntax is no longer supported
 --> src/dos/io.rs:4:9
  |
4 |           asm!("xorl %eax, %eax
  |           ^---
  |           |
  |  _________help: replace with: `llvm_asm!`
  | |
5 | |               inb  %dx,  %al"
6 | |              : "={al}"(ret)
7 | |              : "{dx}"(port)
8 | |             );
  | |______________^
  |
  = 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
@o8vm
Copy link
Owner

o8vm commented Oct 4, 2020

Thanks for the report. I think I'm going to move the asm! macro to llvm_asm! once and then to the new asm!.

@o8vm o8vm added bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed labels Oct 4, 2020
@o8vm o8vm linked a pull request Jan 23, 2021 that will close this issue
@o8vm o8vm closed this as completed in #2 Jan 23, 2021
o8vm added a commit that referenced this issue Jan 23, 2021
@o8vm
Copy link
Owner

o8vm commented Jan 23, 2021

New asm syntax is supported, and the build environment has been redesigned. This issue has been fixed and the build is now easier. If the issue persists, please open a new issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants