[cfe-dev] Target Definition for MicroBlaze

Wesley Peck peckw at ittc.ku.edu
Wed Feb 24 12:34:48 PST 2010


I have recently committed a LLVM backend for the MicroBlaze soft-processor to the LLVM repository. Attached is a Clang target definition for the new LLVM backend. I followed the example of other backends when creating this file. The only thing I was unsure about was how to support the MicroBlaze specific intrinsics.

In all of the examples that I found the processor specific intrinsics were included in the main top level LLVM Intrinsic definitions (include/llvm/Intrinsics.td) but my backend does not include the processor specific intrinsics in the top level file. It defines them inside of the MicroBlaze target definition (lib/Target/MBlaze/MBlazeIntrinsics.td). This was done at the request of the LLVM developers.

I solved this problem by modifying the Makefile for CodeGen so that the LLVM source and object directories were included on the C++ include path. I could then include the MicroBlaze specific intrinsic info file which gives me access to helper functions which return a intrinsic id given the GCC builtin name.

Whoever reviews the patch may want to look especially close at how this is done because it differs from what the other backends seemed to be doing.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 2010-02-24-mblaze-clang.patch.gz
Type: application/x-gzip
Size: 3038 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20100224/7ed2b269/attachment.bin>
-------------- next part --------------


Thank you,

--
Wesley Peck
University of Kansas
SLDG Laboratory



More information about the cfe-dev mailing list