[LLVMdev] LLVM and Interrupt Service Routines.
sanjiv.gupta at microchip.com
Sun Jul 26 03:42:51 PDT 2009
Jakob Stoklund Olesen wrote:
> On 24/07/2009, at 19.41, <Alireza.Moshtaghi at microchip.com> wrote:
>> As you know PIC16 does not have stack; so generating code for ISR and
>> all functions that it calls (including all stdlib and basic math
>> intrinsics used for mult/div/etc) requires special code generation
>> techniques. But we don't have this information until after llvm-ld has
>> merged all compilation units into one. Theoretically llvm-ld can also
>> correct the calling convention for the two classes of functions, but
>> not sure about the practicality of it.
> What happens with functions that are called both inside and outside
> ISR context? Do you have to codegen two copies of those?
Yes. That's precisely what we are trying to achieve in llvm-ld.
But the problems don't end there, as llvm-ld doesn't have any idea of
libcalls (they're generated in llc) and they could also be called from
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
More information about the llvm-dev