[PATCH] D123200: [compiler-rt][CMake] Add initial support of target AVR

2022-04-19 Thread Ben Shi via Phabricator via cfe-commits
benshi001 added a comment. I added three functions __mulqi3: int8 multiplication __mulhi3: int16 multiplication _exit : golobal terminator All of them are contained in libgcc and are necessary. Some key points, 1. The functions are written in the minimal avrtiny instruction set, so

[PATCH] D123200: [compiler-rt][CMake] Add initial support of target AVR

2022-04-19 Thread Ben Shi via Phabricator via cfe-commits
benshi001 updated this revision to Diff 423805. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123200/new/ https://reviews.llvm.org/D123200 Files: compiler-rt/cmake/Modules/CompilerRTUtils.cmake compiler-rt/cmake/base-config-ix.cmake compiler-rt/cmake/builtin-config-ix.cmake

[PATCH] D123200: [compiler-rt][CMake] Add initial support of target AVR

2022-04-11 Thread Ben Shi via Phabricator via cfe-commits
benshi001 marked an inline comment as done. benshi001 added a comment. In D123200#3444520 , @MaskRay wrote: > Initial support for a new target has a high standard. It needs to show decent > support, otherwise it may just invite fixups which may in the

[PATCH] D123200: [compiler-rt][CMake] Add initial support of target AVR

2022-04-11 Thread Ben Shi via Phabricator via cfe-commits
benshi001 marked an inline comment as done. benshi001 added inline comments. Comment at: clang/lib/Basic/Targets/AVR.cpp:380 Builder.defineMacro("__AVR"); + Builder.defineMacro("__avr"); Builder.defineMacro("__AVR__"); MaskRay wrote: > The clang

[PATCH] D123200: [compiler-rt][CMake] Add initial support of target AVR

2022-04-11 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/Basic/Targets/AVR.cpp:380 Builder.defineMacro("__AVR"); + Builder.defineMacro("__avr"); Builder.defineMacro("__AVR__"); The clang preprocessor changes are unrelated to compiler-rt and should be

[PATCH] D123200: [compiler-rt][CMake] Add initial support of target AVR

2022-04-11 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Initial support for a new target has a high standard. It needs to show decent support, otherwise it may just invite fixups which may in the end waste review resources. Showing that these files buildable is far from enough. You'd need to show that the run-time tests

[PATCH] D123200: [compiler-rt][CMake] Add initial support of target AVR

2022-04-07 Thread Ben Shi via Phabricator via cfe-commits
benshi001 added a comment. In D123200#3436043 , @aykevl wrote: > What about chip families other than avr2 (the default)? Some have a different > PC pointer size (1-3 bytes, therefore affecting the ABI), some have different > instructions, etc. There

[PATCH] D123200: [compiler-rt][CMake] Add initial support of target AVR

2022-04-07 Thread Ayke via Phabricator via cfe-commits
aykevl added a comment. What about chip families other than avr2? Some have a different PC pointer size (1-3 bytes, therefore affecting the ABI), some have different instructions, etc. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123200/new/