Skip to content
Permalink
Browse files

8238896: Massive x86_32 crashes after JDK-7175279 (Don't use x87 FPU …

…on x86-64)

Reviewed-by: thartmann, stuefe, vlivanov
  • Loading branch information
shipilev committed Feb 13, 2020
1 parent 18b31b1 commit a4616a7b49f801a08e0f6c4c1b3b60a5d9af0331
Showing with 8 additions and 5 deletions.
  1. +8 −5 src/hotspot/cpu/x86/c1_LIRAssembler_x86.cpp
@@ -908,11 +908,6 @@ void LIR_Assembler::reg2reg(LIR_Opr src, LIR_Opr dest) {
} else if (dest->is_double_xmm() && !src->is_double_xmm()) {
__ fstp_d(Address(rsp, 0));
__ movdbl(dest->as_xmm_double_reg(), Address(rsp, 0));

// move between fpu-registers (no instruction necessary because of fpu-stack)
} else if (dest->is_single_fpu() || dest->is_double_fpu()) {
assert(src->is_single_fpu() || src->is_double_fpu(), "must match");
assert(src->fpu() == dest->fpu(), "currently should be nothing to do");
#endif // !_LP64

// move between xmm-registers
@@ -923,6 +918,13 @@ void LIR_Assembler::reg2reg(LIR_Opr src, LIR_Opr dest) {
assert(src->is_double_xmm(), "must match");
__ movdbl(dest->as_xmm_double_reg(), src->as_xmm_double_reg());

#ifndef _LP64
// move between fpu-registers (no instruction necessary because of fpu-stack)
} else if (dest->is_single_fpu() || dest->is_double_fpu()) {
assert(src->is_single_fpu() || src->is_double_fpu(), "must match");
assert(src->fpu() == dest->fpu(), "currently should be nothing to do");
#endif // !_LP64

} else {
ShouldNotReachHere();
}
@@ -1595,6 +1597,7 @@ void LIR_Assembler::emit_opConvert(LIR_OpConvert* op) {
__ movl(Address(rsp, BytesPerWord), src->as_register_hi());
__ fild_d(Address(rsp, 0));
// float result is rounded later through spilling
break;

case Bytecodes::_f2i:
case Bytecodes::_d2i:

0 comments on commit a4616a7

Please sign in to comment.