This is an archive of the discontinued LLVM Phabricator instance.

[ARM] Fix registers clobbered by SjLj EH on soft-float targets
ClosedPublic

Authored by olista01 on Oct 3 2016, 2:30 AM.

Details

Summary

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.

Diff Detail

Repository
rL LLVM

Event Timeline

olista01 updated this revision to Diff 73251.Oct 3 2016, 2:30 AM
olista01 retitled this revision from to [ARM] Fix registers clobbered by SjLj EH on soft-float targets.
olista01 updated this object.
olista01 added a reviewer: t.p.northover.
olista01 set the repository for this revision to rL LLVM.
olista01 added a subscriber: llvm-commits.
t.p.northover accepted this revision.Oct 10 2016, 11:39 AM
t.p.northover edited edge metadata.

Thanks Oliver. I think this looks reasonable.

This revision is now accepted and ready to land.Oct 10 2016, 11:39 AM
This revision was automatically updated to reflect the committed changes.