Fix ARM SjLj-EH dispatch setup code. <rdar://problem/10444602>
authorBob Wilson <bob.wilson@apple.com>
Wed, 16 Nov 2011 07:11:57 +0000 (07:11 +0000)
committerBob Wilson <bob.wilson@apple.com>
Wed, 16 Nov 2011 07:11:57 +0000 (07:11 +0000)
commiteaab6ef6eb12fc950f1d4371b297d9b7ca9d4c66
tree6a14fdbc94014048c22807ac6f21a93674c71642
parent2713d045e3df9d4602f020088001cbc96ca680c3
Fix ARM SjLj-EH dispatch setup code. <rdar://problem/10444602>

The EmitBasePointerRecalculation function has 2 problems, one minor and one
fatal.  The minor problem is that it inserts the code at the setjmp
instead of in the dispatch block.  The fatal problem is that at the point
where this code runs, we don't know whether there will be a base pointer,
so the entire function is a no-op.  The base pointer recalculation needs to
be handled as it was before, by inserting a pseudo instruction that gets
expanded late.

Most of the support for the old approach is still here, but it no longer
has any connection to the eh_sjlj_dispatchsetup intrinsic.  Clean up the
parts related to the intrinsic and just generate the pseudo instruction
directly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144781 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/ARM/ARMExpandPseudoInsts.cpp
lib/Target/ARM/ARMISelLowering.cpp
lib/Target/ARM/ARMISelLowering.h
lib/Target/ARM/ARMInstrInfo.td