-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
[AVR] Jumps are off by 2 #102436
Comments
Alright, adding
... seems to solve the problem, but is it the correct solution? |
Issue has been already solved, just forgot to add |
Though 86a60e7 has been merged, the fix is incorrect, since the llvm-objdump still has problem, as I have indicated at #102936 (comment) |
@Patryk27 If you are busy, please assign this issue to me. I will take a time to find a better solution later this month. |
Ah, right, I forgot about it - feel free to take a stab at it. |
@Patryk27 Your fix is good! I have made a mistake, and I have confirmed the output of both |
Cool, thanks for checking! 🙂 |
Hi,
Ever since 6859685 (or, more precisely, 84428da), the AVR backend encodes jumps across basic blocks with an extra offset of 2.
That's related to this check:
llvm-project/llvm/lib/Target/AVR/MCTargetDesc/AVRAsmBackend.cpp
Line 521 in 1919db9
... which wasn't triggered for basic blocks before, but it is now (i.e.
shouldForceRelocation()
returnsfalse
for such jumps now).I'm working on a pure LLVM reproducer, but the original rustc issue has been reported here - if you compare the *.elf from older toolchain and the newer toolchain, you'll see that calls are alright, but jumps have an extra offset.
The text was updated successfully, but these errors were encountered: