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