--- a/hotspot/src/cpu/x86/vm/interpreter_x86_32.cpp Fri Jan 08 11:41:04 2016 +0100
+++ b/hotspot/src/cpu/x86/vm/interpreter_x86_32.cpp Fri Jan 08 21:06:50 2016 -0800
@@ -116,10 +116,24 @@
__ fld_d(Address(rsp, 1*wordSize));
switch (kind) {
case Interpreter::java_lang_math_sin :
- __ trigfunc('s');
+ __ subptr(rsp, 2 * wordSize);
+ __ fstp_d(Address(rsp, 0));
+ if (VM_Version::supports_sse2() && StubRoutines::dsin() != NULL) {
+ __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, StubRoutines::dsin())));
+ } else {
+ __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, SharedRuntime::dsin)));
+ }
+ __ addptr(rsp, 2 * wordSize);
break;
case Interpreter::java_lang_math_cos :
- __ trigfunc('c');
+ __ subptr(rsp, 2 * wordSize);
+ __ fstp_d(Address(rsp, 0));
+ if (VM_Version::supports_sse2() && StubRoutines::dcos() != NULL) {
+ __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, StubRoutines::dcos())));
+ } else {
+ __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, SharedRuntime::dcos)));
+ }
+ __ addptr(rsp, 2 * wordSize);
break;
case Interpreter::java_lang_math_tan :
__ trigfunc('t');
@@ -135,8 +149,7 @@
__ fstp_d(Address(rsp, 0));
if (VM_Version::supports_sse2()) {
__ call(RuntimeAddress(CAST_FROM_FN_PTR(address, StubRoutines::dlog())));
- }
- else {
+ } else {
__ call(RuntimeAddress(CAST_FROM_FN_PTR(address, SharedRuntime::dlog)));
}
__ addptr(rsp, 2 * wordSize);