mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-03-01 01:53:16 +01:00
Fix x86-64 exception handling #180. Thanks pcwalton!
This commit is contained in:
@@ -302,10 +302,12 @@ extern(C) _Unwind_Reason_Code _d_eh_personality(int ver, _Unwind_Action actions,
|
|||||||
// These are the register numbers for SetGR that
|
// These are the register numbers for SetGR that
|
||||||
// llvm's eh.exception and eh.selector intrinsics
|
// llvm's eh.exception and eh.selector intrinsics
|
||||||
// will pick up.
|
// will pick up.
|
||||||
// Found by trial-and-error :/
|
// Hints for these can be found by looking at the
|
||||||
|
// EH_RETURN_DATA_REGNO macro in GCC, careful testing
|
||||||
|
// is required though.
|
||||||
version (X86_64)
|
version (X86_64)
|
||||||
{
|
{
|
||||||
private int eh_exception_regno = 3;
|
private int eh_exception_regno = 0;
|
||||||
private int eh_selector_regno = 1;
|
private int eh_selector_regno = 1;
|
||||||
} else {
|
} else {
|
||||||
private int eh_exception_regno = 0;
|
private int eh_exception_regno = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user