OSDN Git Service

[ARM] Fix registers clobbered by SjLj EH on soft-float targets
authorOliver Stannard <oliver.stannard@arm.com>
Tue, 11 Oct 2016 10:06:59 +0000 (10:06 +0000)
committerOliver Stannard <oliver.stannard@arm.com>
Tue, 11 Oct 2016 10:06:59 +0000 (10:06 +0000)
commitf903c003416ce49539e3af49e2af375e3fcd25d8
tree19808044d08bb35bf450e319b630db10b740a762
parent8d8506a21e7352d40a4c62b5a60c892aacecef5e
[ARM] Fix registers clobbered by SjLj EH on soft-float targets

Currently, the Int_eh_sjlj_dispatchsetup intrinsic is marked as
clobbering all registers, including floating-point registers that may
not be present on the target. This is technically true, as we could get
linked against code that does use the FP registers, but that will not
actually work, as the soft-float code cannot save and restore the FP
registers. SjLj exception handling can only work correctly if either all
or none of the code is built for a target with FP registers. Therefore,
we can assume that, when Int_eh_sjlj_dispatchsetup is compiled for a
soft-float target, it is only going to be linked against other
soft-float code, and so only clobbers the general-purpose registers.
This allows us to check that no non-savable registers are clobbered when
generating the prologue/epilogue.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283866 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/ARM/ARMBaseRegisterInfo.cpp
lib/Target/ARM/ARMBaseRegisterInfo.h
lib/Target/ARM/ARMCallingConv.td
lib/Target/ARM/ARMISelLowering.cpp
test/CodeGen/ARM/eh-dispcont.ll