[PATCH] D137572: [AVR][Clang] Implement __AVR_HAVE_*__ macros

Ben Shi via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 17 22:54:49 PST 2022


benshi001 accepted this revision.
benshi001 added a comment.
This revision is now accepted and ready to land.

LGTM



================
Comment at: clang/lib/Basic/Targets/AVR.cpp:355
+    .Cases("31", "51", "6", true)
+    .Cases("104", "105", "106", "107", true)
+    .Default(false);
----------------
aykevl wrote:
> benshi001 wrote:
> > benshi001 wrote:
> > > ATxmega16a4 with family code 102 also supports ELPM. Could you please make a careful check on ELPM and all other features? 
> > > 
> > > Generally speaking I am very glad to have this patch committed, since it fixes
> > > 
> > > https://github.com/llvm/llvm-project/issues/56157
> > > 
> > I suggest that you can make your code in accordance with https://github.com/llvm/llvm-project/blob/main/llvm/lib/Target/AVR/AVRDevices.td
> I checked all 102 family chips and indeed they all support ELPM. This looks like a bug in avr-gcc, which claims these devices don't support ELPM.
> 
> I did check AVRDevices.td but apparently I made some mistakes. I've checked again and fixed a few small issues. There are still some left but they are difficult to fix without reading AVRDevices.td directly.
That is OK enough, Thanks.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D137572



More information about the cfe-commits mailing list