[PATCH] D117725: [AVR] Fix atomicrmw result value

Ayke via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jan 22 11:07:03 PST 2022


aykevl added inline comments.


================
Comment at: llvm/lib/Target/AVR/AVRISelLowering.cpp:1705
+  MachineBasicBlock::iterator I(MI);
+  const Register SCRATCH_REGISTER = AVR::R0;
+  const unsigned SREG_ADDR = 0x3f;
----------------
aykevl wrote:
> benshi001 wrote:
> > Also, do we need to make a helper function `int getRegScratch(void)` in `AVRSubtarget.h`, just like I have done as `getIORegRAMPZ(void)` ? The new helper function will return r16 for avr-tiny devices.
> > 
> > Also, do we need a helper function `int getIORegSREG(void)` instead of hard coded `0x3f` ?
> See my comment in D117426.
Sorry I mean D117425.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D117725



More information about the llvm-commits mailing list