< prev index next >

src/cpu/x86/vm/interpreter_x86_32.cpp

Print this page




 115   //       this entry point for the corresponding methods in JDK 1.3.
 116   // get argument
 117   __ fld_d(Address(rsp, 1*wordSize));
 118   switch (kind) {
 119     case Interpreter::java_lang_math_sin :
 120         __ trigfunc('s');
 121         break;
 122     case Interpreter::java_lang_math_cos :
 123         __ trigfunc('c');
 124         break;
 125     case Interpreter::java_lang_math_tan :
 126         __ trigfunc('t');
 127         break;
 128     case Interpreter::java_lang_math_sqrt:
 129         __ fsqrt();
 130         break;
 131     case Interpreter::java_lang_math_abs:
 132         __ fabs();
 133         break;
 134     case Interpreter::java_lang_math_log:
 135         __ flog();
 136         // Store to stack to convert 80bit precision back to 64bits
 137         __ push_fTOS();
 138         __ pop_fTOS();





 139         break;
 140     case Interpreter::java_lang_math_log10:
 141         __ flog10();
 142         // Store to stack to convert 80bit precision back to 64bits
 143         __ push_fTOS();
 144         __ pop_fTOS();
 145         break;
 146     case Interpreter::java_lang_math_pow:
 147       __ fld_d(Address(rsp, 3*wordSize)); // second argument
 148       __ pow_with_fallback(0);
 149       // Store to stack to convert 80bit precision back to 64bits
 150       __ push_fTOS();
 151       __ pop_fTOS();
 152       break;
 153     case Interpreter::java_lang_math_exp:
 154       __ subptr(rsp, 2*wordSize);
 155       __ fstp_d(Address(rsp, 0));
 156       if (VM_Version::supports_sse2()) {
 157         __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, StubRoutines::dexp())));
 158       } else {




 115   //       this entry point for the corresponding methods in JDK 1.3.
 116   // get argument
 117   __ fld_d(Address(rsp, 1*wordSize));
 118   switch (kind) {
 119     case Interpreter::java_lang_math_sin :
 120         __ trigfunc('s');
 121         break;
 122     case Interpreter::java_lang_math_cos :
 123         __ trigfunc('c');
 124         break;
 125     case Interpreter::java_lang_math_tan :
 126         __ trigfunc('t');
 127         break;
 128     case Interpreter::java_lang_math_sqrt:
 129         __ fsqrt();
 130         break;
 131     case Interpreter::java_lang_math_abs:
 132         __ fabs();
 133         break;
 134     case Interpreter::java_lang_math_log:
 135         __ subptr(rsp, 2 * wordSize);
 136         __ fstp_d(Address(rsp, 0));
 137         if (VM_Version::supports_sse2()) {
 138           __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, StubRoutines::dlog())));
 139         }
 140         else {
 141           __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, SharedRuntime::dlog)));
 142         }
 143         __ addptr(rsp, 2 * wordSize);
 144         break;
 145     case Interpreter::java_lang_math_log10:
 146         __ flog10();
 147         // Store to stack to convert 80bit precision back to 64bits
 148         __ push_fTOS();
 149         __ pop_fTOS();
 150         break;
 151     case Interpreter::java_lang_math_pow:
 152       __ fld_d(Address(rsp, 3*wordSize)); // second argument
 153       __ pow_with_fallback(0);
 154       // Store to stack to convert 80bit precision back to 64bits
 155       __ push_fTOS();
 156       __ pop_fTOS();
 157       break;
 158     case Interpreter::java_lang_math_exp:
 159       __ subptr(rsp, 2*wordSize);
 160       __ fstp_d(Address(rsp, 0));
 161       if (VM_Version::supports_sse2()) {
 162         __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, StubRoutines::dexp())));
 163       } else {


< prev index next >