1311 assert(frame_complete != -1, "Must be set");
1312 assert(stack_slots != -1, "Must be set");
1313 assert(vep_offset != -1, "Must be set");
1314 #endif
1315
1316 __ flush();
1317 nmethod* nm = nmethod::new_native_nmethod(method,
1318 compile_id,
1319 masm->code(),
1320 vep_offset,
1321 frame_complete,
1322 stack_slots,
1323 in_ByteSize(-1),
1324 in_ByteSize(-1),
1325 oop_maps,
1326 exception_offset);
1327 if (nm == nullptr) return nm;
1328 if (method->is_continuation_enter_intrinsic()) {
1329 ContinuationEntry::set_enter_code(nm, interpreted_entry_offset);
1330 } else if (method->is_continuation_yield_intrinsic()) {
1331 _cont_doYield_stub = nm;
1332 } else {
1333 guarantee(false, "Unknown Continuation native intrinsic");
1334 }
1335 return nm;
1336 }
1337
1338 if (method->is_method_handle_intrinsic()) {
1339 vmIntrinsics::ID iid = method->intrinsic_id();
1340 intptr_t start = (intptr_t)__ pc();
1341 int vep_offset = ((intptr_t)__ pc()) - start;
1342
1343 // First instruction must be a nop as it may need to be patched on deoptimisation
1344 {
1345 Assembler::IncompressibleScope scope(masm); // keep the nop as 4 bytes for patching.
1346 MacroAssembler::assert_alignment(__ pc());
1347 __ nop(); // 4 bytes
1348 }
1349 gen_special_dispatch(masm,
1350 method,
1351 in_sig_bt,
|
1311 assert(frame_complete != -1, "Must be set");
1312 assert(stack_slots != -1, "Must be set");
1313 assert(vep_offset != -1, "Must be set");
1314 #endif
1315
1316 __ flush();
1317 nmethod* nm = nmethod::new_native_nmethod(method,
1318 compile_id,
1319 masm->code(),
1320 vep_offset,
1321 frame_complete,
1322 stack_slots,
1323 in_ByteSize(-1),
1324 in_ByteSize(-1),
1325 oop_maps,
1326 exception_offset);
1327 if (nm == nullptr) return nm;
1328 if (method->is_continuation_enter_intrinsic()) {
1329 ContinuationEntry::set_enter_code(nm, interpreted_entry_offset);
1330 } else if (method->is_continuation_yield_intrinsic()) {
1331 ContinuationEntry::set_yield_code(nm);
1332 } else {
1333 guarantee(false, "Unknown Continuation native intrinsic");
1334 }
1335 return nm;
1336 }
1337
1338 if (method->is_method_handle_intrinsic()) {
1339 vmIntrinsics::ID iid = method->intrinsic_id();
1340 intptr_t start = (intptr_t)__ pc();
1341 int vep_offset = ((intptr_t)__ pc()) - start;
1342
1343 // First instruction must be a nop as it may need to be patched on deoptimisation
1344 {
1345 Assembler::IncompressibleScope scope(masm); // keep the nop as 4 bytes for patching.
1346 MacroAssembler::assert_alignment(__ pc());
1347 __ nop(); // 4 bytes
1348 }
1349 gen_special_dispatch(masm,
1350 method,
1351 in_sig_bt,
|