[PATCH] D28820: Warn when calling a non interrupt function from an interrupt on ARM
Jonathan Roelofs via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jan 18 11:58:15 PST 2017
jroelofs added a comment.
In https://reviews.llvm.org/D28820#649738, @jroelofs wrote:
> In https://reviews.llvm.org/D28820#649726, @efriedma wrote:
> > Why can't the compiler handle this case itself transparently? According to your description, the interrupt calling convention is different from the normal hard-float AAPCS calling convention: the VFP registers are all callee-save. The compiler knows this; it should be able to insert the appropriate spills itself.
> There would be a big performance penalty for ISRs with callees that don't use VFP regs.
Then again, it probably makes sense to add all the VFP regs to the ISR calling convention's CalleeSavedRegs, as the ISR /should/ be spilling them if it uses them.
More information about the cfe-commits