@@ -2589,38 +2589,6 @@ LONG Handle_IDiv_Exception(struct _EXCEPTION_POINTERS* exceptionInfo) {
25892589 return EXCEPTION_CONTINUE_EXECUTION;
25902590}
25912591
2592- #if defined(_M_AMD64)
2593- // -----------------------------------------------------------------------------
2594- static bool handle_FLT_exception (struct _EXCEPTION_POINTERS * exceptionInfo) {
2595- // handle exception caused by native method modifying control word
2596- DWORD exception_code = exceptionInfo->ExceptionRecord ->ExceptionCode ;
2597-
2598- switch (exception_code) {
2599- case EXCEPTION_FLT_DENORMAL_OPERAND:
2600- case EXCEPTION_FLT_DIVIDE_BY_ZERO:
2601- case EXCEPTION_FLT_INEXACT_RESULT:
2602- case EXCEPTION_FLT_INVALID_OPERATION:
2603- case EXCEPTION_FLT_OVERFLOW:
2604- case EXCEPTION_FLT_STACK_CHECK:
2605- case EXCEPTION_FLT_UNDERFLOW: {
2606- PCONTEXT ctx = exceptionInfo->ContextRecord ;
2607- // On Windows, the mxcsr control bits are non-volatile across calls
2608- // See also CR 6192333
2609- //
2610- jint MxCsr = INITIAL_MXCSR;
2611- // we can't use StubRoutines::x86::addr_mxcsr_std()
2612- // because in Win64 mxcsr is not saved there
2613- if (MxCsr != ctx->MxCsr ) {
2614- ctx->MxCsr = MxCsr;
2615- return true ;
2616- }
2617- }
2618- }
2619-
2620- return false ;
2621- }
2622- #endif
2623-
26242592static inline void report_error (Thread* t, DWORD exception_code,
26252593 address addr, void * siginfo, void * context) {
26262594 VMError::report_and_die (t, exception_code, addr, siginfo, context);
@@ -2805,6 +2773,7 @@ LONG WINAPI topLevelExceptionFilter(struct _EXCEPTION_POINTERS* exceptionInfo) {
28052773 }
28062774
28072775#if defined(_M_AMD64)
2776+ extern bool handle_FLT_exception (struct _EXCEPTION_POINTERS * exceptionInfo);
28082777 if ((in_java || in_native) && handle_FLT_exception (exceptionInfo)) {
28092778 return EXCEPTION_CONTINUE_EXECUTION;
28102779 }
0 commit comments