[PATCH] D86629: [AVR][clang] Pass the address of the data section to the linker for ATmega328

2020-10-28 Thread Dylan McKay via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rG88b7b76a0b23: [AVR][clang] Pass the address of the data section to the linker for ATmega328 (authored by dylanmckay).

[PATCH] D86629: [AVR][clang] Pass the address of the data section to the linker for ATmega328

2020-10-28 Thread Dylan McKay via Phabricator via cfe-commits
dylanmckay added a comment. Regarding TableGen; I would like to send an RFC to llvm-dev to come up with a proper API to expose backend-specific device-specific information and constants to LLVM frontends, as I can imagine that many backends could stand to benefit. I note that there is in

[PATCH] D86629: [AVR][clang] Pass the address of the data section to the linker for ATmega328

2020-10-28 Thread Dylan McKay via Phabricator via cfe-commits
dylanmckay added inline comments. Comment at: clang/lib/Driver/ToolChains/AVR.cpp:40 +llvm::Optional GetMcuSectionAddressData(StringRef MCU) { + return llvm::StringSwitch>(MCU) benshi001 wrote: > aykevl wrote: > > I don't think the LLVM coding style says

[PATCH] D86629: [AVR][clang] Pass the address of the data section to the linker for ATmega328

2020-09-28 Thread Ben Shi via Phabricator via cfe-commits
benshi001 added a comment. I think this patch is OK to be committed. And I hope 1. Temporarily using an array for more devices, before a solution of getting info from the tblgen. 2. Distinghuish the arguments for "-L" and "-m". It is correct for atmega328 that avr-ld needs

[PATCH] D86629: [AVR][clang] Pass the address of the data section to the linker for ATmega328

2020-09-21 Thread Ayke via Phabricator via cfe-commits
aykevl added a comment. Looks reasonable to me, although I can't really comment on the contents of this as I'm not very familiar with this code. I would like to see just a single MCU table that contains all the information (including start addresses). Maybe it can even be generated from ATDF

[PATCH] D86629: [AVR][clang] Pass the address of the data section to the linker for ATmega328

2020-09-21 Thread Dylan McKay via Phabricator via cfe-commits
dylanmckay added a comment. Hey @aykevl, could you please confirm that this patch looks okay? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86629/new/ https://reviews.llvm.org/D86629 ___ cfe-commits

[PATCH] D86629: [AVR][clang] Pass the address of the data section to the linker for ATmega328

2020-08-26 Thread Dylan McKay via Phabricator via cfe-commits
dylanmckay created this revision. dylanmckay added a reviewer: aykevl. Herald added a subscriber: Jim. Herald added a project: clang. dylanmckay requested review of this revision. This patch modifies the Clang AVR toolchain so that it always passes the '-Tdata=0x800100' to the linker for