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

Ben Shi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 21 06:08:44 PST 2022


benshi001 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;
----------------
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` ?


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