Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
8258896: Remove the JVM ForceFloatExceptions option
Reviewed-by: lfoltan, iklam, coleenp
  • Loading branch information
Harold Seigel committed Jan 5, 2021
1 parent fc3b45c commit f4122d6aa21fc589cd0f75ea29998447e0f1ea36
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 18 deletions.
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -4183,21 +4183,14 @@ jint os::init_2(void) {
#endif

// for debugging float code generation bugs
if (ForceFloatExceptions) {
#ifndef _WIN64
static long fp_control_word = 0;
__asm { fstcw fp_control_word }
// see Intel PPro Manual, Vol. 2, p 7-16
const long precision = 0x20;
const long underflow = 0x10;
const long overflow = 0x08;
const long zero_div = 0x04;
const long denorm = 0x02;
const long invalid = 0x01;
fp_control_word |= invalid;
__asm { fldcw fp_control_word }
#if defined(ASSERT) && !defined(_WIN64)
static long fp_control_word = 0;
__asm { fstcw fp_control_word }
// see Intel PPro Manual, Vol. 2, p 7-16
const long invalid = 0x01;
fp_control_word |= invalid;
__asm { fldcw fp_control_word }
#endif
}

// If stack_commit_size is 0, windows will reserve the default size,
// but only commit a small portion of it.
@@ -461,9 +461,6 @@ const intx ObjectAlignmentInBytes = 8;
product(bool, BytecodeVerificationLocal, false, DIAGNOSTIC, \
"Enable the Java bytecode verifier for local classes") \
\
develop(bool, ForceFloatExceptions, trueInDebug, \
"Force exceptions on FP stack under/overflow") \
\
develop(bool, VerifyStackAtCalls, false, \
"Verify that the stack pointer is unchanged after calls") \
\

0 comments on commit f4122d6

Please sign in to comment.