[PATCH] D15781: [compiler-rt] Add support for ARM EHABI to gcc_personality_v0.
Timon Van Overveldt via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 15 15:35:38 PST 2016
timonvo marked 3 inline comments as done.
================
Comment at: lib/builtins/gcc_personality_v0.c:148
@@ +147,3 @@
+ * unwinding a single stack frame before returning (ARM EHABI Sec. 6.1).
+ */
+ if (__gnu_unwind_frame(exceptionObject, context) != _URC_OK)
----------------
I did run it through clang-format now (although I used an IndentWidth of 4 rather than the 2 LLVM style prescribes, because the rest of this file is already formatted that way).
================
Comment at: lib/builtins/gcc_personality_v0.c:185
@@ +184,3 @@
+#if USING_ARM_EHABI
+ if ((state & _US_ACTION_MASK) == _US_VIRTUAL_UNWIND_FRAME)
+#else
----------------
I believe what I have is correct. In short _US_VIRTUAL_UNWIND_FRAME is the equivalent of _UA_SEARCH_PHASE on other architectures. GCC's implementation has similar logic as well.
This is discussed in http://infocenter.arm.com/help/topic/com.arm.doc.ihi0038b/IHI0038B_ehabi.pdf, Sec 7.3. During Phase 1, the unwinder '... calls the PR, passing state
_US_VIRTUAL_UNWIND_FRAME, the UCB pointer, and an _Unwind_Context pointer for VRS access.' It's only during Phase 2 that the unwinder calls the PR with _US_UNWIND_FRAME_STARTING. During that phase we have to make sure that we call the landing pad if it exists, hence we can't bail early anymore here.
http://reviews.llvm.org/D15781
More information about the llvm-commits
mailing list