For 16-bit ports, the normal devices reqiure writing high byte first
and then low byte. But the XMEGA devices require the reverse order.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Target/AVR/AVRExpandPseudoInsts.cpp | ||
---|---|---|
1404 | I like this form Low bound <= variable && variable <= high bound. Rather then variable' <= Low bound` && variable <= high bound. which looks like variable is in range [low, high]. |
This works for the out instruction, but what about a regular volatile store? I think it should be changed in the same way.
llvm/lib/Target/AVR/AVRExpandPseudoInsts.cpp | ||
---|---|---|
1402–1403 | I think this is usually done via subtarget flags, not by looking at e_flags. I couldn't easily find something similar in other targets. But this also works. |
I have done for both OUTW and STSWKRr. Thanks!
llvm/lib/Target/AVR/AVRExpandPseudoInsts.cpp | ||
---|---|---|
1402–1403 | I have added a new target feature FeatureLowByteFirst and all XMEGA families contains this new feature. |
llvm/lib/Target/AVR/AVRISelLowering.cpp | ||
---|---|---|
1138 | We disallow post increment store for 16-bit store on ordinary AVRs, while the XMEGA devices are still allowed. |
Unfortunately many tests are affected, fortunately the only change is exchanging the order of a store pair. ^_^
llvm/test/CodeGen/AVR/pseudo/STDWPtrQRr.mir | ||
---|---|---|
24 | The only difference between CHECK and CHECK-XMEGA is the order. |
I think this is usually done via subtarget flags, not by looking at e_flags. I couldn't easily find something similar in other targets. But this also works.