[LLVMdev] New 8bit micro controller back-end

Alireza.Moshtaghi at microchip.com Alireza.Moshtaghi at microchip.com
Mon Nov 23 08:45:49 PST 2009


Our 8-bit port for PIC16 has taken roughly about 18 months to get to
where we are now. Our instruction set is not orthogonal, data memory is
banked, program memory is paged, there is only one accumulator and two
pointer registers, and the use of indirect memory access is really
expensive. So we had to implement some non conventional approaches to
get the model working.

For the most part, LLVM generic optimizations (except for mem2reg kind
of optimizations) reduce the code size pretty good and typical
applications that we use for PIC16 fit in the memory without problem. 

We use clang and LLVM just to generate assembly output. We have our own
assembler, linker and debugger. In fact we have to implement some of our
tricks in the linker and assembler in order to allow mix of C and
assembly projects. If your users only want to use C, then you can
probably use a lot more of the analysis capabilities of LLVM than what
we use. 

Our ABI and model of code generation is probably far from what you need,
but you may find some tricks in our port that can be useful to you as
well.

 

Regards

Ali

 

________________________________

From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu]
On Behalf Of Guillaume Deroire
Sent: Monday, November 23, 2009 6:46 AM
To: LLVM Developers Mailing List
Subject: [LLVMdev] New 8bit micro controller back-end

 

Hi all,

I'm new to LLVM dev mailling list and I'm starting to discover some
aspects of LLVM.

Actually I'm looking for a solution to create a tool chain for my own
chip (a 8bit micro controller processor) that include a
compiler/linker/assembler toolset and a simulator/debugger.

>From what I've read, LLVM is a good tool to implement a compiler for
this proprietary platform, but I have the following questions:
- Is there estimation (from your experiences) of the work required to
implement a backend for a simple 8bits micro controller architecture (1
men-month, 10 or 100 ?)
- Is it possible to create a debugger/simulator (at C and assembler
level) with LLVM ?

Thanks for your help and advices

Regards

Guillaume

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20091123/33aefb66/attachment.html>


More information about the llvm-dev mailing list