diff options
author | asaha <none@none> | 2016-06-15 14:21:31 -0700 |
---|---|---|
committer | asaha <none@none> | 2016-06-15 14:21:31 -0700 |
commit | 4bc8ed624007892c6133e602741b890f94291512 (patch) | |
tree | 936a47c17b55bd367b17e668c6edeada92cb16ed /src/cpu/x86 | |
parent | 2284be2b11142bc2eca94c0db3497ff3074f563d (diff) | |
parent | 350d0ca45ef0a7116ac7bf435eebc6907187911f (diff) | |
download | jdk8u_hotspot-4bc8ed624007892c6133e602741b890f94291512.tar.gz |
Merge
Diffstat (limited to 'src/cpu/x86')
-rw-r--r-- | src/cpu/x86/vm/macroAssembler_x86.cpp | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/src/cpu/x86/vm/macroAssembler_x86.cpp b/src/cpu/x86/vm/macroAssembler_x86.cpp index e2ea04b79..30490d451 100644 --- a/src/cpu/x86/vm/macroAssembler_x86.cpp +++ b/src/cpu/x86/vm/macroAssembler_x86.cpp @@ -3202,7 +3202,24 @@ void MacroAssembler::pow_or_exp(bool is_exp, int num_fpu_regs_in_use) { jmp(done); } else { // Stack: X Y - Label x_negative, y_odd; + Label x_negative, y_not_2; + + static double two = 2.0; + ExternalAddress two_addr((address)&two); + + // constant maybe too far on 64 bit + lea(tmp2, two_addr); + fld_d(Address(tmp2, 0)); // Stack: 2 X Y + fcmp(tmp, 2, true, false); // Stack: X Y + jcc(Assembler::parity, y_not_2); + jcc(Assembler::notEqual, y_not_2); + + fxch(); fpop(); // Stack: X + fmul(0); // Stack: X*X + + jmp(done); + + bind(y_not_2); fldz(); // Stack: 0 X Y fcmp(tmp, 1, true, false); // Stack: X Y |