1294 assert(frame_complete != -1, "Must be set");
1295 assert(stack_slots != -1, "Must be set");
1296 assert(vep_offset != -1, "Must be set");
1297 #endif
1298
1299 __ flush();
1300 nmethod* nm = nmethod::new_native_nmethod(method,
1301 compile_id,
1302 masm->code(),
1303 vep_offset,
1304 frame_complete,
1305 stack_slots,
1306 in_ByteSize(-1),
1307 in_ByteSize(-1),
1308 oop_maps,
1309 exception_offset);
1310 if (nm == nullptr) return nm;
1311 if (method->is_continuation_enter_intrinsic()) {
1312 ContinuationEntry::set_enter_code(nm, interpreted_entry_offset);
1313 } else if (method->is_continuation_yield_intrinsic()) {
1314 _cont_doYield_stub = nm;
1315 } else {
1316 guarantee(false, "Unknown Continuation native intrinsic");
1317 }
1318 return nm;
1319 }
1320
1321 if (method->is_method_handle_intrinsic()) {
1322 vmIntrinsics::ID iid = method->intrinsic_id();
1323 intptr_t start = (intptr_t)__ pc();
1324 int vep_offset = ((intptr_t)__ pc()) - start;
1325
1326 // First instruction must be a nop as it may need to be patched on deoptimisation
1327 {
1328 Assembler::IncompressibleScope scope(masm); // keep the nop as 4 bytes for patching.
1329 MacroAssembler::assert_alignment(__ pc());
1330 __ nop(); // 4 bytes
1331 }
1332 gen_special_dispatch(masm,
1333 method,
1334 in_sig_bt,
|
1294 assert(frame_complete != -1, "Must be set");
1295 assert(stack_slots != -1, "Must be set");
1296 assert(vep_offset != -1, "Must be set");
1297 #endif
1298
1299 __ flush();
1300 nmethod* nm = nmethod::new_native_nmethod(method,
1301 compile_id,
1302 masm->code(),
1303 vep_offset,
1304 frame_complete,
1305 stack_slots,
1306 in_ByteSize(-1),
1307 in_ByteSize(-1),
1308 oop_maps,
1309 exception_offset);
1310 if (nm == nullptr) return nm;
1311 if (method->is_continuation_enter_intrinsic()) {
1312 ContinuationEntry::set_enter_code(nm, interpreted_entry_offset);
1313 } else if (method->is_continuation_yield_intrinsic()) {
1314 ContinuationEntry::set_yield_code(nm);
1315 } else {
1316 guarantee(false, "Unknown Continuation native intrinsic");
1317 }
1318 return nm;
1319 }
1320
1321 if (method->is_method_handle_intrinsic()) {
1322 vmIntrinsics::ID iid = method->intrinsic_id();
1323 intptr_t start = (intptr_t)__ pc();
1324 int vep_offset = ((intptr_t)__ pc()) - start;
1325
1326 // First instruction must be a nop as it may need to be patched on deoptimisation
1327 {
1328 Assembler::IncompressibleScope scope(masm); // keep the nop as 4 bytes for patching.
1329 MacroAssembler::assert_alignment(__ pc());
1330 __ nop(); // 4 bytes
1331 }
1332 gen_special_dispatch(masm,
1333 method,
1334 in_sig_bt,
|