1397 } |
1397 } |
1398 |
1398 |
1399 // do the compilation |
1399 // do the compilation |
1400 if (method->is_native()) { |
1400 if (method->is_native()) { |
1401 if (!PreferInterpreterNativeStubs || method->is_method_handle_intrinsic()) { |
1401 if (!PreferInterpreterNativeStubs || method->is_method_handle_intrinsic()) { |
|
1402 // The following native methods: |
|
1403 // |
|
1404 // java.lang.Float.intBitsToFloat |
|
1405 // java.lang.Float.floatToRawIntBits |
|
1406 // java.lang.Double.longBitsToDouble |
|
1407 // java.lang.Double.doubleToRawLongBits |
|
1408 // |
|
1409 // are called through the interpreter even if interpreter native stubs |
|
1410 // are not preferred (i.e., calling through adapter handlers is preferred). |
|
1411 // The reason is that on x86_32 signaling NaNs (sNaNs) are not preserved |
|
1412 // if the version of the methods from the native libraries is called. |
|
1413 // As the interpreter and the C2-intrinsified version of the methods preserves |
|
1414 // sNaNs, that would result in an inconsistent way of handling of sNaNs. |
|
1415 if ((UseSSE >= 1 && |
|
1416 (method->intrinsic_id() == vmIntrinsics::_intBitsToFloat || |
|
1417 method->intrinsic_id() == vmIntrinsics::_floatToRawIntBits)) || |
|
1418 (UseSSE >= 2 && |
|
1419 (method->intrinsic_id() == vmIntrinsics::_longBitsToDouble || |
|
1420 method->intrinsic_id() == vmIntrinsics::_doubleToRawLongBits))) { |
|
1421 return NULL; |
|
1422 } |
|
1423 |
1402 // To properly handle the appendix argument for out-of-line calls we are using a small trampoline that |
1424 // To properly handle the appendix argument for out-of-line calls we are using a small trampoline that |
1403 // pops off the appendix argument and jumps to the target (see gen_special_dispatch in SharedRuntime). |
1425 // pops off the appendix argument and jumps to the target (see gen_special_dispatch in SharedRuntime). |
1404 // |
1426 // |
1405 // Since normal compiled-to-compiled calls are not able to handle such a thing we MUST generate an adapter |
1427 // Since normal compiled-to-compiled calls are not able to handle such a thing we MUST generate an adapter |
1406 // in this case. If we can't generate one and use it we can not execute the out-of-line method handle calls. |
1428 // in this case. If we can't generate one and use it we can not execute the out-of-line method handle calls. |