[cfe-dev] How to add target to Clang?
dev at antonsmirnov.name
Wed Nov 26 11:22:23 PST 2014
Thanks for replying.
I've found Attr.td and Targets.cpp filse to add AVR-specific attributes and
You're absolutely right and i should just consult AVR datasheets to write
correct types sizes and so on.
Are there any other files to modufy to add AVR support?
2014-11-26 23:25 GMT+06:00 Reid Kleckner <rnk at google.com>:
> LLVM IR isn't portable, and you will need to teach Clang about your
> target. The two big things it needs to know are record layout rules and
> calling convention lowering rules. Record layout should be easy, it is just
> the size and alignment of basic types like pointers and i64 (4 or 8 byte
> aligned?). Calling convention lowering is tricky, as you need to understand
> the ABI rules for struct passing, and how you implemented them in LLVM.
> On Wed, Nov 26, 2014 at 9:13 AM, Anton Smirnov <dev at antonsmirnov.name>
>> I'm working on AVR backend/target and it's almost working:
>> I've read how to add LLVM backend/Target:
>> But how can i add target (AVR) to Clang?
>> Is it designed to add targets easily or should i hack the sources?
>> That makes sense as some information is lost at the moment, f.e.
>> __attribute__ ((section .. ))
>> Regards, Anton.
>> cfe-dev mailing list
>> cfe-dev at cs.uiuc.edu
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-dev