hotspot/src/cpu/x86/vm/interpreter_x86_32.cpp
changeset 35540 e001ad24dcdb
parent 35146 9ebfec283f56
child 35546 b75e269c0922
equal deleted inserted replaced
35539:9a687b686976 35540:e001ad24dcdb
   114   //       this entry point for the corresponding methods in JDK 1.3.
   114   //       this entry point for the corresponding methods in JDK 1.3.
   115   // get argument
   115   // get argument
   116   __ fld_d(Address(rsp, 1*wordSize));
   116   __ fld_d(Address(rsp, 1*wordSize));
   117   switch (kind) {
   117   switch (kind) {
   118     case Interpreter::java_lang_math_sin :
   118     case Interpreter::java_lang_math_sin :
   119         __ trigfunc('s');
   119         __ subptr(rsp, 2 * wordSize);
       
   120         __ fstp_d(Address(rsp, 0));
       
   121         if (VM_Version::supports_sse2() && StubRoutines::dsin() != NULL) {
       
   122           __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, StubRoutines::dsin())));
       
   123         } else {
       
   124           __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, SharedRuntime::dsin)));
       
   125         }
       
   126         __ addptr(rsp, 2 * wordSize);
   120         break;
   127         break;
   121     case Interpreter::java_lang_math_cos :
   128     case Interpreter::java_lang_math_cos :
   122         __ trigfunc('c');
   129         __ subptr(rsp, 2 * wordSize);
       
   130         __ fstp_d(Address(rsp, 0));
       
   131         if (VM_Version::supports_sse2() && StubRoutines::dcos() != NULL) {
       
   132           __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, StubRoutines::dcos())));
       
   133         } else {
       
   134           __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, SharedRuntime::dcos)));
       
   135         }
       
   136         __ addptr(rsp, 2 * wordSize);
   123         break;
   137         break;
   124     case Interpreter::java_lang_math_tan :
   138     case Interpreter::java_lang_math_tan :
   125         __ trigfunc('t');
   139         __ trigfunc('t');
   126         break;
   140         break;
   127     case Interpreter::java_lang_math_sqrt:
   141     case Interpreter::java_lang_math_sqrt:
   133     case Interpreter::java_lang_math_log:
   147     case Interpreter::java_lang_math_log:
   134         __ subptr(rsp, 2 * wordSize);
   148         __ subptr(rsp, 2 * wordSize);
   135         __ fstp_d(Address(rsp, 0));
   149         __ fstp_d(Address(rsp, 0));
   136         if (VM_Version::supports_sse2()) {
   150         if (VM_Version::supports_sse2()) {
   137           __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, StubRoutines::dlog())));
   151           __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, StubRoutines::dlog())));
   138         }
   152         } else {
   139         else {
       
   140           __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, SharedRuntime::dlog)));
   153           __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, SharedRuntime::dlog)));
   141         }
   154         }
   142         __ addptr(rsp, 2 * wordSize);
   155         __ addptr(rsp, 2 * wordSize);
   143         break;
   156         break;
   144     case Interpreter::java_lang_math_log10:
   157     case Interpreter::java_lang_math_log10: