[PATCH] D137572: [AVR][Clang] Implement __AVR_HAVE_*__ macros
Ayke via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 7 09:54:47 PST 2022
aykevl created this revision.
aykevl added reviewers: benshi001, dylanmckay.
Herald added a subscriber: Jim.
Herald added a project: All.
aykevl requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
These macros are defined in avr-gcc and are useful when working with assembly.
For example, startup code needs to copy the contents of .data from flash to RAM, but should use elpm (instead of lpm) on devices with more than 64kB flash. Without `__AVR_HAVE_ELPM__`, there is no way to know whether the elpm instruction is supported.
Depends on D137521 <https://reviews.llvm.org/D137521>.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D137572
Files:
clang/lib/Basic/Targets/AVR.cpp
clang/test/Preprocessor/avr-atmega328p.c
clang/test/Preprocessor/avr-attiny104.c
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D137572.473726.patch
Type: text/x-patch
Size: 3749 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20221107/20a91d02/attachment.bin>
More information about the cfe-commits
mailing list