< prev index next >
src/cpu/x86/vm/interpreter_x86_32.cpp
Print this page
@@ -115,14 +115,28 @@
// this entry point for the corresponding methods in JDK 1.3.
// get argument
__ 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');
break;
case Interpreter::java_lang_math_sqrt:
@@ -134,12 +148,11 @@
case Interpreter::java_lang_math_log:
__ subptr(rsp, 2 * wordSize);
__ 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);
break;
case Interpreter::java_lang_math_log10:
< prev index next >