-
Notifications
You must be signed in to change notification settings - Fork 14
CPI, and who knows what other instructions, are defined with wrong operand registers #50
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
Comments
|
This is super scary because of course it's trivial to fix this one, but now I'm wondering how many other instructions are defined with incorrect register classes... |
Unfortunately, I can't think of any automated way to verify these. All that's coming to mind is to read through the manual and the code and check each one 🤷♀️ . |
Interesting. I believe this TableGen definition has been left untouched since I forked the project from SourceForge. I'm surprised that it included a bug this bug! On the positive side, I implemented most of the instruction set myself, while carefully reading the manual. It is unlikely there are many (if any) serious bugs like this. Really nice catch though! |
Fix upstreamed in |
(avr-rust/rust-legacy-fork#50) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304283 91177308-0d34-0410-b5e6-96231b3b80d8
(avr-rust/rust-legacy-fork#50) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304283 91177308-0d34-0410-b5e6-96231b3b80d8
Fix has been cherry picked into |
(avr-rust/rust-legacy-fork#50) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304283 91177308-0d34-0410-b5e6-96231b3b80d8
LLVM IR:
Generated assembly with
--filetype=asm
:Disassembly of output generated with
--filetype=obj
:Note that the
.o
file usesr31
for comparisons (without ever filling that register) while the.s
file, correctly, usesr15
, e.g. inLBB0_2
:The text was updated successfully, but these errors were encountered: