mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-21 19:44:41 +02:00
6910664: C2: java/util/Arrays/Sorting.java fails with DeoptimizeALot flag
Matcher::float_in_double should be true only when FPU is used for floats. Reviewed-by: never, twisti
This commit is contained in:
parent
3e1688a8cd
commit
fa2d360cd5
5 changed files with 14 additions and 9 deletions
|
@ -1803,8 +1803,9 @@ void Matcher::pd_implicit_null_fixup(MachNode *node, uint idx) {
|
||||||
// to implement the UseStrictFP mode.
|
// to implement the UseStrictFP mode.
|
||||||
const bool Matcher::strict_fp_requires_explicit_rounding = false;
|
const bool Matcher::strict_fp_requires_explicit_rounding = false;
|
||||||
|
|
||||||
// Do floats take an entire double register or just half?
|
// Are floats conerted to double when stored to stack during deoptimization?
|
||||||
const bool Matcher::float_in_double = false;
|
// Sparc does not handle callee-save floats.
|
||||||
|
bool Matcher::float_in_double() { return false; }
|
||||||
|
|
||||||
// Do ints take an entire long register or just half?
|
// Do ints take an entire long register or just half?
|
||||||
// Note that we if-def off of _LP64.
|
// Note that we if-def off of _LP64.
|
||||||
|
|
|
@ -1444,8 +1444,10 @@ void Matcher::pd_implicit_null_fixup(MachNode *node, uint idx) {
|
||||||
// to implement the UseStrictFP mode.
|
// to implement the UseStrictFP mode.
|
||||||
const bool Matcher::strict_fp_requires_explicit_rounding = true;
|
const bool Matcher::strict_fp_requires_explicit_rounding = true;
|
||||||
|
|
||||||
// Do floats take an entire double register or just half?
|
// Are floats conerted to double when stored to stack during deoptimization?
|
||||||
const bool Matcher::float_in_double = true;
|
// On x32 it is stored with convertion only when FPU is used for floats.
|
||||||
|
bool Matcher::float_in_double() { return (UseSSE == 0); }
|
||||||
|
|
||||||
// Do ints take an entire long register or just half?
|
// Do ints take an entire long register or just half?
|
||||||
const bool Matcher::int_in_long = false;
|
const bool Matcher::int_in_long = false;
|
||||||
|
|
||||||
|
|
|
@ -2074,8 +2074,10 @@ void Matcher::pd_implicit_null_fixup(MachNode *node, uint idx) {}
|
||||||
// implement the UseStrictFP mode.
|
// implement the UseStrictFP mode.
|
||||||
const bool Matcher::strict_fp_requires_explicit_rounding = true;
|
const bool Matcher::strict_fp_requires_explicit_rounding = true;
|
||||||
|
|
||||||
// Do floats take an entire double register or just half?
|
// Are floats conerted to double when stored to stack during deoptimization?
|
||||||
const bool Matcher::float_in_double = true;
|
// On x64 it is stored without convertion so we can use normal access.
|
||||||
|
bool Matcher::float_in_double() { return false; }
|
||||||
|
|
||||||
// Do ints take an entire long register or just half?
|
// Do ints take an entire long register or just half?
|
||||||
const bool Matcher::int_in_long = true;
|
const bool Matcher::int_in_long = true;
|
||||||
|
|
||||||
|
|
|
@ -373,8 +373,8 @@ public:
|
||||||
// to implement the UseStrictFP mode.
|
// to implement the UseStrictFP mode.
|
||||||
static const bool strict_fp_requires_explicit_rounding;
|
static const bool strict_fp_requires_explicit_rounding;
|
||||||
|
|
||||||
// Do floats take an entire double register or just half?
|
// Are floats conerted to double when stored to stack during deoptimization?
|
||||||
static const bool float_in_double;
|
static bool float_in_double();
|
||||||
// Do ints take an entire long register or just half?
|
// Do ints take an entire long register or just half?
|
||||||
static const bool int_in_long;
|
static const bool int_in_long;
|
||||||
|
|
||||||
|
|
|
@ -678,7 +678,7 @@ void Compile::FillLocArray( int idx, MachSafePointNode* sfpt, Node *local,
|
||||||
#endif //_LP64
|
#endif //_LP64
|
||||||
else if( (t->base() == Type::FloatBot || t->base() == Type::FloatCon) &&
|
else if( (t->base() == Type::FloatBot || t->base() == Type::FloatCon) &&
|
||||||
OptoReg::is_reg(regnum) ) {
|
OptoReg::is_reg(regnum) ) {
|
||||||
array->append(new_loc_value( _regalloc, regnum, Matcher::float_in_double
|
array->append(new_loc_value( _regalloc, regnum, Matcher::float_in_double()
|
||||||
? Location::float_in_dbl : Location::normal ));
|
? Location::float_in_dbl : Location::normal ));
|
||||||
} else if( t->base() == Type::Int && OptoReg::is_reg(regnum) ) {
|
} else if( t->base() == Type::Int && OptoReg::is_reg(regnum) ) {
|
||||||
array->append(new_loc_value( _regalloc, regnum, Matcher::int_in_long
|
array->append(new_loc_value( _regalloc, regnum, Matcher::int_in_long
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue