Mercurial > hg > graal-jvmci-8
comparison src/os_cpu/windows_x86/vm/os_windows_x86.cpp @ 11127:980532a806a5
8016697: Use stubs to implement safefetch
Summary: Implement Safefetch as stub routines. This reduces compiler and os dependencies.
Reviewed-by: twisti, kvn
author | goetz |
---|---|
date | Thu, 20 Jun 2013 15:02:05 +0200 |
parents | 12285410684f |
children | 6b0fd0964b87 38f750491293 |
comparison
equal
deleted
inserted
replaced
11088:ea4d24c1e0c6 | 11127:980532a806a5 |
---|---|
516 #endif | 516 #endif |
517 | 517 |
518 st->cr(); | 518 st->cr(); |
519 } | 519 } |
520 | 520 |
521 extern "C" int SafeFetch32 (int * adr, int Err) { | |
522 int rv = Err ; | |
523 _try { | |
524 rv = *((volatile int *) adr) ; | |
525 } __except(EXCEPTION_EXECUTE_HANDLER) { | |
526 } | |
527 return rv ; | |
528 } | |
529 | |
530 extern "C" intptr_t SafeFetchN (intptr_t * adr, intptr_t Err) { | |
531 intptr_t rv = Err ; | |
532 _try { | |
533 rv = *((volatile intptr_t *) adr) ; | |
534 } __except(EXCEPTION_EXECUTE_HANDLER) { | |
535 } | |
536 return rv ; | |
537 } | |
538 | |
539 extern "C" int SpinPause () { | 521 extern "C" int SpinPause () { |
540 #ifdef AMD64 | 522 #ifdef AMD64 |
541 return 0 ; | 523 return 0 ; |
542 #else | 524 #else |
543 // pause == rep:nop | 525 // pause == rep:nop |