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 __ exp_with_fallback(0); 155 // Store to stack to convert 80bit precision back to 64bits 156 __ push_fTOS(); 157 __ pop_fTOS(); 158 break; 159 default : 160 ShouldNotReachHere(); 161 } 162 163 // return double result in xmm0 for interpreter and compilers. 164 if (UseSSE >= 2) { 165 __ subptr(rsp, 2*wordSize); 166 __ fstp_d(Address(rsp, 0)); 167 __ movdbl(xmm0, Address(rsp, 0)); 168 __ addptr(rsp, 2*wordSize); 169 } 170 171 // done, result in FPU ST(0) or XMM0 172 __ pop(rdi); // get return address 173 __ mov(rsp, rsi); // set sp to sender sp 174 __ jmp(rdi); 175 176 return entry_point; 177 } | 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 { 159 __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, SharedRuntime::dexp))); 160 } 161 __ addptr(rsp, 2*wordSize); 162 break; 163 default : 164 ShouldNotReachHere(); 165 } 166 167 // return double result in xmm0 for interpreter and compilers. 168 if (UseSSE >= 2) { 169 __ subptr(rsp, 2*wordSize); 170 __ fstp_d(Address(rsp, 0)); 171 __ movdbl(xmm0, Address(rsp, 0)); 172 __ addptr(rsp, 2*wordSize); 173 } 174 175 // done, result in FPU ST(0) or XMM0 176 __ pop(rdi); // get return address 177 __ mov(rsp, rsi); // set sp to sender sp 178 __ jmp(rdi); 179 180 return entry_point; 181 } |