[AVR] Mark call-clobbered registers as clobbered in interrupt handlers
I have matched the RISCV backend, which only uses the interrupt save list in getCalleeSavedRegs, _not_ in getCallPreservedMask. I don't know the details of these two methods, but with it, the correct amount of registers is saved and restored. Without this patch, practically all interrupt handlers that call a function will miscompile. I have added a test to verify this behavior. I've also added a very simple test to verify that more normal interrupt operations (in this case, incrementing a global value) behave as expected. Differential Revision: https://reviews.llvm.org/D116551
Loading
Please sign in to comment