mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-06 19:06:02 +03:00
Fix x86-64 exception handling #180. Thanks pcwalton!
This commit is contained in:
parent
343003cfdc
commit
bbf21853b4
1 changed files with 4 additions and 2 deletions
|
@ -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
|
||||
// llvm's eh.exception and eh.selector intrinsics
|
||||
// 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)
|
||||
{
|
||||
private int eh_exception_regno = 3;
|
||||
private int eh_exception_regno = 0;
|
||||
private int eh_selector_regno = 1;
|
||||
} else {
|
||||
private int eh_exception_regno = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue