242 // This method is called during interpreter_init() whereas 243 // JDK version is only determined when universe2_init() is called. 244 245 // Note: For JDK 1.3 StrictMath exists and Math.sin/cos/sqrt are 246 // java methods. Interpreter::method_kind(...) will select 247 // this entry point for the corresponding methods in JDK 1.3. 248 // get argument 249 250 if (kind == Interpreter::java_lang_math_sqrt) { 251 __ sqrtsd(xmm0, Address(rsp, wordSize)); 252 } else if (kind == Interpreter::java_lang_math_exp) { 253 __ movdbl(xmm0, Address(rsp, wordSize)); 254 __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, StubRoutines::dexp()))); 255 } else if (kind == Interpreter::java_lang_math_log) { 256 __ movdbl(xmm0, Address(rsp, wordSize)); 257 __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, StubRoutines::dlog()))); 258 } else if (kind == Interpreter::java_lang_math_pow) { 259 __ movdbl(xmm1, Address(rsp, wordSize)); 260 __ movdbl(xmm0, Address(rsp, 3 * wordSize)); 261 __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, StubRoutines::dpow()))); 262 } else { 263 __ fld_d(Address(rsp, wordSize)); 264 switch (kind) { 265 case Interpreter::java_lang_math_sin : 266 __ trigfunc('s'); 267 break; 268 case Interpreter::java_lang_math_cos : 269 __ trigfunc('c'); 270 break; 271 case Interpreter::java_lang_math_tan : 272 __ trigfunc('t'); 273 break; 274 case Interpreter::java_lang_math_abs: 275 __ fabs(); 276 break; 277 case Interpreter::java_lang_math_log10: 278 __ flog10(); 279 break; 280 default : 281 ShouldNotReachHere(); | 242 // This method is called during interpreter_init() whereas 243 // JDK version is only determined when universe2_init() is called. 244 245 // Note: For JDK 1.3 StrictMath exists and Math.sin/cos/sqrt are 246 // java methods. Interpreter::method_kind(...) will select 247 // this entry point for the corresponding methods in JDK 1.3. 248 // get argument 249 250 if (kind == Interpreter::java_lang_math_sqrt) { 251 __ sqrtsd(xmm0, Address(rsp, wordSize)); 252 } else if (kind == Interpreter::java_lang_math_exp) { 253 __ movdbl(xmm0, Address(rsp, wordSize)); 254 __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, StubRoutines::dexp()))); 255 } else if (kind == Interpreter::java_lang_math_log) { 256 __ movdbl(xmm0, Address(rsp, wordSize)); 257 __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, StubRoutines::dlog()))); 258 } else if (kind == Interpreter::java_lang_math_pow) { 259 __ movdbl(xmm1, Address(rsp, wordSize)); 260 __ movdbl(xmm0, Address(rsp, 3 * wordSize)); 261 __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, StubRoutines::dpow()))); 262 } else if (kind == Interpreter::java_lang_math_sin && StubRoutines::dsin() != NULL) { 263 __ movdbl(xmm0, Address(rsp, wordSize)); 264 __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, StubRoutines::dsin()))); 265 } else if (kind == Interpreter::java_lang_math_cos && StubRoutines::dcos() != NULL) { 266 __ movdbl(xmm0, Address(rsp, wordSize)); 267 __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, StubRoutines::dcos()))); 268 } else { 269 __ fld_d(Address(rsp, wordSize)); 270 switch (kind) { 271 case Interpreter::java_lang_math_sin : 272 __ trigfunc('s'); 273 break; 274 case Interpreter::java_lang_math_cos : 275 __ trigfunc('c'); 276 break; 277 case Interpreter::java_lang_math_tan : 278 __ trigfunc('t'); 279 break; 280 case Interpreter::java_lang_math_abs: 281 __ fabs(); 282 break; 283 case Interpreter::java_lang_math_log10: 284 __ flog10(); 285 break; 286 default : 287 ShouldNotReachHere(); |