-
Notifications
You must be signed in to change notification settings - Fork 21
sbiw, adiw require a CPU feature not currently enabled #150
Comments
Hi Sean, The The It also looks as if you are using AVR-LLVM as you had to several months ago to work around bugs. This is no longer necessary.
Could you test the patch and see if it works? I'll wait until then to close the issue. Cheers! |
Hey Dylan, I actually need the IR for other reasons, so my workflow hasn't changed much. I'll email you the file, since I don't know that there's a good way to attach it to this issue. |
If possible please put the IR in a gist and paste the URL. That way we have it on record and more people can take a look. |
Thanks @agnat! Here's the gist |
We currently support the syntax: sbci r30, lo8(-mysymbol) ISel is generating an instruction of the form sbci r30, lo8(-mysymbol + 1000) Which is well defined in the context of relocations, we just aren't handling this case. As GAS does not handle the negative This is the only way we can support adding a constant on the end while still maintaining the proper meaning. i.e. I'm working on this now. |
Right... Yes, that's deep. There are so many places where we mess with Hoisting the negation out of the modifier makes sense, however. Ping me for review. |
Will do :) |
Fixed in 03b893d.
I forgot to do this - oh the joy of |
Hehe... use branches... like always ;)
Wow. I'll give it a read. :) |
I built the latest version of AVR LLVM, which has come a long way in the last couple of months, but I'm running into an issue compiling to object code with a source file I'm using.
I can generate assembly from the file using the AVR LLVM backend, but I can't reduce it to object code using the AVR LLVM tools. If I try to go directly from the IR, I get a very unhelpful
LLVM ERROR: expected relocatable expression
with no indication of what is causing it. If I try to use llvm-mc to assemble the .s file, I get errors about sbiw and adiw requiring a CPU feature not currently enabled.(note I'm glossing over some warnings generated by clang, but those are related to the program, not to this project)
I'm opening this issue in the hopes that this problem is not enormously complicated to solve. I'd love to provide more information for debugging purposes. I'm really not sure how to isolate this into a simpler test case. The source file in question can be found here
The text was updated successfully, but these errors were encountered: