[PATCH] D87735: [AVR] fix interrupt stack pointer restoration
Andrew Dona-Couch via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 15 18:54:02 PDT 2020
couchand created this revision.
couchand added a reviewer: dylanmckay.
Herald added subscribers: llvm-commits, Jim, hiraditya.
Herald added a project: LLVM.
couchand requested review of this revision.
This patch fixes a corruption of the stack pointer and several registers in any AVR interrupt with non-empty stack frame. Previously, the callee-saved registers were popped before restoring the stack pointer, causing the pointer math to use the wrong base value while also corrupting the caller's register. This change fixes the code to restore the stack pointer last before exiting the interrupt service routine.
https://bugs.llvm.org/show_bug.cgi?id=47253
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D87735
Files:
llvm/lib/Target/AVR/AVRFrameLowering.cpp
llvm/test/CodeGen/AVR/interrupts.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D87735.292072.patch
Type: text/x-patch
Size: 3421 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200916/e90b9969/attachment.bin>
More information about the llvm-commits
mailing list