Skip to content
This repository was archived by the owner on Feb 8, 2024. It is now read-only.

Commit 013841f

Browse files
committed
Merge pull request #57 from smolt/eh-arm-eabi
Cache ARM EABI exception data
2 parents 9cd2905 + 7ff059d commit 013841f

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/ldc/eh/libunwind.d

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,17 @@ struct NativeContext
247247
debug(EH_personality) printf(" - Found catch clause for %p\n", exception_struct);
248248

249249
if (actions & _Unwind_Action.SEARCH_PHASE)
250+
{
251+
// Cache phase 1 data (TODO: take advantage of cache)
252+
version (ARM_EABI_UNWINDER) with (exception_struct.unwind_info)
253+
{
254+
barrier_cache.sp = _Unwind_GetGR(context, UNWIND_STACK_REG);
255+
barrier_cache.bitpattern[1] = ti_offset;
256+
barrier_cache.bitpattern[3] = landingPadAddr;
257+
}
258+
250259
return _Unwind_Reason_Code.HANDLER_FOUND;
260+
}
251261

252262
if (!(actions & _Unwind_Action.CLEANUP_PHASE))
253263
fatalerror("Unknown phase");

0 commit comments

Comments
 (0)