[LLVMdev] Creating a backend target -- must I modify include/llvm/ADT/Triple.h ?

Liu proljc at gmail.com
Tue Aug 3 00:18:59 PDT 2010

Hi Trip Volpe,
Maybe you can read PIC16 or MSP430 backend, and ask the authors.

2010/8/3 Trip Volpe <mraccident at gmail.com>

> I'm having a go at writing an LLVM backend for the WDC 65816. The
> documentation page on writing an LLVM backend<http://llvm.org/docs/WritingAnLLVMBackend.html>gives this example of target registration:
>     extern "C" void LLVMInitializeSparcTargetInfo() {
>         RegisterTarget<Triple::sparc, /*HasJIT=*/false>
>         X(TheSparcTarget, "sparc", "Sparc");
>     }
> The part I'm wondering about is Triple::sparc. If I'm writing a target for
> a different architecture, is it necessary for that architecture to have an
> entry in Triple's ArchType enumeration? The documentation doesn't seem to
> mention anything about adding members to the enumeration; is it an optional
> step? Making lots of small changes outside the specific source tree for the
> 65816 backend is something I'd prefer to avoid just at the moment,
> especially since it looks like I'd have to add a fair bit to Triple.cpp as
> well.  :-)
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100803/0042a26a/attachment.html>

More information about the llvm-dev mailing list