1245 __ st_ptr(O1_scratch, Address(O0_argslot, 0)); 1246 } else { 1247 Address prim_value_addr(O1_scratch, java_lang_boxing_object::value_offset_in_bytes(arg_type)); 1248 move_typed_arg(_masm, arg_type, false, 1249 prim_value_addr, 1250 Address(O0_argslot, 0), 1251 O2_scratch); // must be an even register for !_LP64 long moves (uses O2/O3) 1252 } 1253 1254 if (direct_to_method) { 1255 __ load_heap_oop(G3_mh_vmtarget, G5_method); // target is a methodOop 1256 jump_from_method_handle(_masm, G5_method, O1_scratch, O2_scratch); 1257 } else { 1258 __ load_heap_oop(G3_mh_vmtarget, G3_method_handle); // target is a methodOop 1259 __ verify_oop(G3_method_handle); 1260 __ jump_to_method_handle_entry(G3_method_handle, O1_scratch); 1261 } 1262 } 1263 break; 1264 1265 case _adapter_retype_only: 1266 case _adapter_retype_raw: 1267 // Immediately jump to the next MH layer: 1268 __ load_heap_oop(G3_mh_vmtarget, G3_method_handle); 1269 __ verify_oop(G3_method_handle); 1270 __ jump_to_method_handle_entry(G3_method_handle, O1_scratch); 1271 // This is OK when all parameter types widen. 1272 // It is also OK when a return type narrows. 1273 break; 1274 1275 case _adapter_check_cast: 1276 { 1277 // Check a reference argument before jumping to the next layer of MH: 1278 load_vmargslot(_masm, G3_amh_vmargslot, O0_argslot); 1279 Address vmarg = __ argument_address(O0_argslot, O0_argslot); 1280 1281 // What class are we casting to? 1282 Register O1_klass = O1_scratch; // Interesting AMH data. 1283 __ load_heap_oop(G3_amh_argument, O1_klass); // This is a Class object! 1284 load_klass_from_Class(_masm, O1_klass, O2_scratch, O3_scratch); | 1245 __ st_ptr(O1_scratch, Address(O0_argslot, 0)); 1246 } else { 1247 Address prim_value_addr(O1_scratch, java_lang_boxing_object::value_offset_in_bytes(arg_type)); 1248 move_typed_arg(_masm, arg_type, false, 1249 prim_value_addr, 1250 Address(O0_argslot, 0), 1251 O2_scratch); // must be an even register for !_LP64 long moves (uses O2/O3) 1252 } 1253 1254 if (direct_to_method) { 1255 __ load_heap_oop(G3_mh_vmtarget, G5_method); // target is a methodOop 1256 jump_from_method_handle(_masm, G5_method, O1_scratch, O2_scratch); 1257 } else { 1258 __ load_heap_oop(G3_mh_vmtarget, G3_method_handle); // target is a methodOop 1259 __ verify_oop(G3_method_handle); 1260 __ jump_to_method_handle_entry(G3_method_handle, O1_scratch); 1261 } 1262 } 1263 break; 1264 1265 case _adapter_opt_profiling: 1266 if (java_lang_invoke_CountingMethodHandle::vmcount_offset_in_bytes() != 0) { 1267 Address G3_mh_vmcount(G3_method_handle, java_lang_invoke_CountingMethodHandle::vmcount_offset_in_bytes()); 1268 __ ld(G3_mh_vmcount, O1_scratch); 1269 __ add(O1_scratch, 1, O1_scratch); 1270 __ st(O1_scratch, G3_mh_vmcount); 1271 } 1272 // fall through 1273 1274 case _adapter_retype_only: 1275 case _adapter_retype_raw: 1276 // Immediately jump to the next MH layer: 1277 __ load_heap_oop(G3_mh_vmtarget, G3_method_handle); 1278 __ verify_oop(G3_method_handle); 1279 __ jump_to_method_handle_entry(G3_method_handle, O1_scratch); 1280 // This is OK when all parameter types widen. 1281 // It is also OK when a return type narrows. 1282 break; 1283 1284 case _adapter_check_cast: 1285 { 1286 // Check a reference argument before jumping to the next layer of MH: 1287 load_vmargslot(_masm, G3_amh_vmargslot, O0_argslot); 1288 Address vmarg = __ argument_address(O0_argslot, O0_argslot); 1289 1290 // What class are we casting to? 1291 Register O1_klass = O1_scratch; // Interesting AMH data. 1292 __ load_heap_oop(G3_amh_argument, O1_klass); // This is a Class object! 1293 load_klass_from_Class(_masm, O1_klass, O2_scratch, O3_scratch); |