[LLVMdev] LLVM on small MCUs?
John Regehr
regehr at cs.utah.edu
Mon May 19 11:37:28 PDT 2008
> Most of the support that I have seen for this in other compilers amounts
> to custom calling conventions and preambles. Are you thinking of more
> than this?
I believe that is all that is required for AVR.
As far as I know avr-gcc does just one thing that goes beyond implementing
interrupts as naked functions with canned prologue/epilogue: it applies a
final peephole pass that avoids push/pop of any registers that an
interrupt handler never touches. Probably not too hard to replicate this
in an LLVM backend.
For my purposes an AVR backend for LLVM would need to be almost 100%
source compatible with gcc. From what I understand about LLVM, this comes
largely for free.
LLVM appears to properly support the GCC compiler barrier idiom:
asm volatile ("":::"memory")
so that is good.
John
More information about the llvm-dev
mailing list