[ARM] Fix unwind info for Thumb1 functions that save high registers.
authorEli Friedman <efriedma@quicinc.com>
Tue, 2 Jul 2019 21:35:15 +0000 (21:35 +0000)
committerEli Friedman <efriedma@quicinc.com>
Tue, 2 Jul 2019 21:35:15 +0000 (21:35 +0000)
commite97aa961d3255d95c32bb884858ccdd3a00dbadc
treed7edf22fc10a04223a81ff618de11f67ae651dc1
parent10ee3ac396f5d3f4251748d7973bf22faf9fbef9
[ARM] Fix unwind info for Thumb1 functions that save high registers.

There were two issues here: one, some of the relevant instructions were
missing the expected "FrameSetup" flag, and two,
ARMAsmPrinter::EmitUnwindingInstruction wasn't expecting "mov"
instructions in the prologue.

I'm sticking the additional state into ARMFunctionInfo so it's obvious
it only applies to the current function.

I considered a few alternative approaches where we would compute the
correct unwind information as part of the prologue/epilogue lowering,
but it seems like a lot of work to introduce pseudo-instructions, and
the current code seems to be reliable enough.

Fixes https://bugs.llvm.org/show_bug.cgi?id=42408.

Differential Revision: https://reviews.llvm.org/D63964

llvm-svn: 364970
llvm/lib/Target/ARM/ARMAsmPrinter.cpp
llvm/lib/Target/ARM/ARMMachineFunctionInfo.h
llvm/lib/Target/ARM/Thumb1FrameLowering.cpp
llvm/test/CodeGen/Thumb/callee_save.ll