-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
MSP430 compilation fails with "Error: r2 should not be used in indexed addressing mode"; fixed upstream #59077
Comments
I think we're generally speaking tracking trunk quite closely so should be feasible to bump here, cc @alexcrichton |
Friendly ping... has there been any update on this? I'd host my own copy of LLVM with the fix for the time being, but I doubt CI would like that... |
@jamesmunns pointed me to this guide. Doesn't seem too difficult to follow; I think I should be able to do this myself, hopefully within the week, but at the very least soon :). |
Bump LLVM submodule to fix MSP430 AsmPrinter and assembler syntax mismatch. Moving on to steps 9 and 10 of the llvm bugfix [guide](https://rust-lang.github.io/rustc-guide/codegen/updating-llvm.html#bugfix-updates), now that Rust's copy of LLVM was [updated](rust-lang/llvm-project#13). This PR closes issue rust-lang#59077. Nightlies following this PR should have working msp430 codegen again :D. Thanks for the prompt response even though it took me a while to get this "simple" PR done!
Bump LLVM submodule to fix MSP430 AsmPrinter and assembler syntax mismatch. Moving on to steps 9 and 10 of the llvm bugfix [guide](https://rust-lang.github.io/rustc-guide/codegen/updating-llvm.html#bugfix-updates), now that Rust's copy of LLVM was [updated](rust-lang/llvm-project#13). This PR closes issue #59077. Nightlies following this PR should have working msp430 codegen again :D. Thanks for the prompt response even though it took me a while to get this "simple" PR done!
Rust now uses LLVM 9, could you try with recent nightly? |
@mati865 It was fun while it lasted. The transition to LLVM 9 causes a separate error in my AT2XT repo1, so I'm unsure if we've regressed and this particular issue still applies, or if this is simply a totally separate error and the "r2" error was still fixed. Unfortunately, due to illness, I don't think I can work on this for about another week. Could you ping me again then please if I haven't responded at all. I'll just send another LLVM patch if necessary since I know how to do it now.
|
You can try enabling it here but I have no idea if it works at all:
|
@cr1901 I'm looking into this for two evenings already, but still not found where the bug is. What I know so far:
I will keep debugging this and post here if I find something more. |
For reference, the error:
Which means that the MSP430 AsmParser cannot be found (even though it does exist). Looking at https://github.com/rust-lang/rust/blob/master/src/librustc_llvm/lib.rs#L74 we see that we indeed fail to initialize it. |
@nikic no so long ago the asm parser didn't exist on msp430, the inline assembly was just inserted as is into resulting assembly and everything was fine. What exactly have changed that now the asm parser is required? P.S. We can also get rid of |
@pftbest The integrated assembler was enabled in llvm/llvm-project@b26134b, which is why it is now attempted to be used. (The |
Initialize the MSP430 AsmParser Hopefully fixes rust-lang#59077. r? @alexcrichton
Initialize the MSP430 AsmParser Hopefully fixes rust-lang#59077. r? @alexcrichton
Initialize the MSP430 AsmParser Hopefully fixes rust-lang#59077. r? @alexcrichton
Initialize the MSP430 AsmParser Hopefully fixes rust-lang#59077. r? @alexcrichton
Initialize the MSP430 AsmParser Hopefully fixes rust-lang#59077. r? @alexcrichton
Initialize the MSP430 AsmParser Hopefully fixes rust-lang#59077. r? @alexcrichton
Reopening until there is confirmation that this is fixed... |
Every Rust nightly as of approximately Jan 27, 2019 has failed to build my msp430 application due to assembler errors of the following form:
This is due to a bug in the LLVM backend that has been fixed upstream, but hasn't managed to propagate downstream to
rustc
yet (thank you @pftbest for the help).As I understand it, Rust only updates the LLVM backend occassionally, along with some patches; Is it possible to cherry pick this patch so that the msp430 backend works again before the next version bump? I would open this issue on the Rust LLVM fork, but Issues seems to be disabled for this repository...
Meta
Source
The text was updated successfully, but these errors were encountered: