comparison runtime/internal/eh.d @ 897:c6f16c3f377b

Fix x86-64 exception handling #180. Thanks pcwalton!
author Christian Kamm <kamm incasoftware de>
date Thu, 22 Jan 2009 17:50:38 +0100
parents fb4853c46917
children db3f8e7d79d2
comparison
equal deleted inserted replaced
896:fcab41e144c9 897:c6f16c3f377b
300 } 300 }
301 301
302 // These are the register numbers for SetGR that 302 // These are the register numbers for SetGR that
303 // llvm's eh.exception and eh.selector intrinsics 303 // llvm's eh.exception and eh.selector intrinsics
304 // will pick up. 304 // will pick up.
305 // Found by trial-and-error :/ 305 // Hints for these can be found by looking at the
306 // EH_RETURN_DATA_REGNO macro in GCC, careful testing
307 // is required though.
306 version (X86_64) 308 version (X86_64)
307 { 309 {
308 private int eh_exception_regno = 3; 310 private int eh_exception_regno = 0;
309 private int eh_selector_regno = 1; 311 private int eh_selector_regno = 1;
310 } else { 312 } else {
311 private int eh_exception_regno = 0; 313 private int eh_exception_regno = 0;
312 private int eh_selector_regno = 2; 314 private int eh_selector_regno = 2;
313 } 315 }