[PATCH] D38253: [ARM] Restore the right frame pointer register in Int_eh_sjlj_longjmp

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 26 23:45:34 PDT 2017


mstorsjo added a comment.

In https://reviews.llvm.org/D38253#881421, @compnerd wrote:

> Um, doesn't that clobber a register which is unexpected?


I would think it doesn't really matter. Since the __builtin_longjmp only restores fp, sp and pc, the landing pad needs to restore any other registers it expects to have any specific value anyway, so I would expect it not to matter if we additionally modify r7/r11 here.

If you disagree, I can at least provide a version of this patch that only restores one single register, based on `useR7AsFramePointer()`. That should work in all cases except on linux, if cxxabi and the user code are built in differing arm/thumb modes.


https://reviews.llvm.org/D38253





More information about the llvm-commits mailing list