As of PR #96, the MOVW Rd+1:Rd, Rr+1:Rr instruction is properly parsed.
The problem is that GCC does not use this syntax. GCC prints the lower register to indicate the pair. For example, we print movw r17:r16, r19:r18 but GCC prints movw r16, r18.
Our assembly parser correctly handles both syntaxes. We should however print the latter syntax with the lower register, because otherwise GCC will not be able to compile assembly files generated by AVR-LLVM.
This should be as simple as implementing a custom operand printing function in AVRInstPrinter.cpp.
Note that once this issue is fixed, we will be able to correct a large number of AVR CodeGen tests marked XFAIL from issue #27. We could fix them to use the current (GCC incompatible) syntax right now, but it would be nicer if we fixed the problem as opposed to side-stepping it and having to update the tests in the future regardless.
As of PR #96, the
MOVW Rd+1:Rd, Rr+1:Rr
instruction is properly parsed.The problem is that GCC does not use this syntax. GCC prints the lower register to indicate the pair. For example, we print
movw r17:r16, r19:r18
but GCC printsmovw r16, r18
.Our assembly parser correctly handles both syntaxes. We should however print the latter syntax with the lower register, because otherwise GCC will not be able to compile assembly files generated by AVR-LLVM.
This should be as simple as implementing a custom operand printing function in
AVRInstPrinter.cpp
.Note that once this issue is fixed, we will be able to correct a large number of AVR CodeGen tests marked
XFAIL
from issue #27. We could fix them to use the current (GCC incompatible) syntax right now, but it would be nicer if we fixed the problem as opposed to side-stepping it and having to update the tests in the future regardless.