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

Change register used in setting SS in stage_4 #156

Merged
merged 1 commit into from
May 5, 2021

Conversation

Elekrisk
Copy link
Contributor

@Elekrisk Elekrisk commented May 4, 2021

The register bx is apparently reserved by LLVM, and building with the latest nightly (1.54-nightly) fails because of it:

error: invalid register `bx`: rbx is used internally by LLVM and cannot be used as an operand for inline asm
  --> src\bin\bios.rs:55:9
   |
55 |         out("bx") _,
   |  

This pull request changes the register used to ax.
I don't think this'll be able to break anything. cargo test passes, and building and running my own kernel works.

This changes the register used when setting the stack segment in stage_4 from bx to ax.
The register bx is reserved by LLVM.
@phil-opp
Copy link
Member

phil-opp commented May 5, 2021

Thanks for the pull request! I just restarted our CI job in order to test it with the latest nightly and I can confirm that the mentioned error occurs. It looks like it is caused by rust-lang/rust#84658. So apparently using rbx was already incorrect before, it just didn't lead to an error.

@phil-opp phil-opp merged commit af17b60 into rust-osdev:main May 5, 2021
phil-opp added a commit that referenced this pull request May 5, 2021
@phil-opp
Copy link
Member

phil-opp commented May 5, 2021

Published as v0.10.3.

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