[LLVMdev] ISRs for PIC16 [was [llvm]r79631 ...]
John Regehr
regehr at cs.utah.edu
Tue Aug 25 08:59:39 PDT 2009
> Function pointers are where things get fun. To do these, we need to
> determine at run time whether we need to call the ISR or the mainline
> version of a function
This sounds convenient but it may well be overkill.
On a PIC-class platform we can probably consider it to be a design flaw if
the programmer doesn't know whether a function pointer will be
dereferenced from interrupt context or not. This suggests that for any
function whose address is taken, there could be a required annotation such
as ISR_ONLY or NONISR_ONLY. The compiler could use this to do the right
thing without any heroic static analysis or dynamic binding.
John
More information about the llvm-dev
mailing list