[PATCH] D141752: [AVR] Fix an issue of writing 16-bit ports

Ayke via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 19 06:14:30 PST 2023


aykevl added a comment.

This works for the `out` instruction, but what about a regular volatile store? I think it should be changed in the same way.



================
Comment at: llvm/lib/Target/AVR/AVRExpandPseudoInsts.cpp:1273
 
-  // 16 bit I/O writes need the high byte first
-  auto MIBHI = buildMI(MBB, MBBI, OpHi)
-                   .addImm(Imm + 1)
-                   .addReg(SrcHiReg, getKillRegState(SrcIsKill));
+  unsigned ELFArch = STI.getELFArch();
+  bool XMega =
----------------
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.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D141752/new/

https://reviews.llvm.org/D141752



More information about the llvm-commits mailing list