2088 // This is the JNI call.
2089 //////////////////////////////////////////////////////////////////////
2090
2091 __ call_c(native_func);
2092
2093
2094 //////////////////////////////////////////////////////////////////////
2095 // We have survived the call once we reach here.
2096 //////////////////////////////////////////////////////////////////////
2097
2098
2099 //--------------------------------------------------------------------
2100 // Unpack native results.
2101 //--------------------------------------------------------------------
2102 // For int-types, we do any needed sign-extension required.
2103 // Care must be taken that the return value (in Z_ARG1 = Z_RET = Z_R2
2104 // or in Z_FARG0 = Z_FRET = Z_F0) will survive any VM calls for
2105 // blocking or unlocking.
2106 // An OOP result (handle) is done specially in the slow-path code.
2107 //--------------------------------------------------------------------
2108 switch (ret_type) { //GLGLGL
2109 case T_VOID: break; // Nothing to do!
2110 case T_FLOAT: break; // Got it where we want it (unless slow-path)
2111 case T_DOUBLE: break; // Got it where we want it (unless slow-path)
2112 case T_LONG: break; // Got it where we want it (unless slow-path)
2113 case T_OBJECT: break; // Really a handle.
2114 // Cannot de-handlize until after reclaiming jvm_lock.
2115 case T_ARRAY: break;
2116
2117 case T_BOOLEAN: // 0 -> false(0); !0 -> true(1)
2118 __ z_lngfr(Z_RET, Z_RET); // Force sign bit on except for zero.
2119 __ z_srlg(Z_RET, Z_RET, 63); // Shift sign bit into least significant pos.
2120 break;
2121 case T_BYTE: __ z_lgbr(Z_RET, Z_RET); break; // sign extension
2122 case T_CHAR: __ z_llghr(Z_RET, Z_RET); break; // unsigned result
2123 case T_SHORT: __ z_lghr(Z_RET, Z_RET); break; // sign extension
2124 case T_INT: __ z_lgfr(Z_RET, Z_RET); break; // sign-extend for beauty.
2125
2126 default:
2127 ShouldNotReachHere();
2128 break;
|
2088 // This is the JNI call.
2089 //////////////////////////////////////////////////////////////////////
2090
2091 __ call_c(native_func);
2092
2093
2094 //////////////////////////////////////////////////////////////////////
2095 // We have survived the call once we reach here.
2096 //////////////////////////////////////////////////////////////////////
2097
2098
2099 //--------------------------------------------------------------------
2100 // Unpack native results.
2101 //--------------------------------------------------------------------
2102 // For int-types, we do any needed sign-extension required.
2103 // Care must be taken that the return value (in Z_ARG1 = Z_RET = Z_R2
2104 // or in Z_FARG0 = Z_FRET = Z_F0) will survive any VM calls for
2105 // blocking or unlocking.
2106 // An OOP result (handle) is done specially in the slow-path code.
2107 //--------------------------------------------------------------------
2108 switch (ret_type) {
2109 case T_VOID: break; // Nothing to do!
2110 case T_FLOAT: break; // Got it where we want it (unless slow-path)
2111 case T_DOUBLE: break; // Got it where we want it (unless slow-path)
2112 case T_LONG: break; // Got it where we want it (unless slow-path)
2113 case T_OBJECT: break; // Really a handle.
2114 // Cannot de-handlize until after reclaiming jvm_lock.
2115 case T_ARRAY: break;
2116
2117 case T_BOOLEAN: // 0 -> false(0); !0 -> true(1)
2118 __ z_lngfr(Z_RET, Z_RET); // Force sign bit on except for zero.
2119 __ z_srlg(Z_RET, Z_RET, 63); // Shift sign bit into least significant pos.
2120 break;
2121 case T_BYTE: __ z_lgbr(Z_RET, Z_RET); break; // sign extension
2122 case T_CHAR: __ z_llghr(Z_RET, Z_RET); break; // unsigned result
2123 case T_SHORT: __ z_lghr(Z_RET, Z_RET); break; // sign extension
2124 case T_INT: __ z_lgfr(Z_RET, Z_RET); break; // sign-extend for beauty.
2125
2126 default:
2127 ShouldNotReachHere();
2128 break;
|