@@ -356,18 +356,6 @@ void NativeMovRegMem::verify() {
356356
357357void NativeJump::verify () { }
358358
359-
360- void NativeJump::check_verified_entry_alignment (address entry, address verified_entry) {
361- // Patching to not_entrant can happen while activations of the method are
362- // in use. The patching in that instance must happen only when certain
363- // alignment restrictions are true. These guarantees check those
364- // conditions.
365-
366- // Must be 4 bytes aligned
367- MacroAssembler::assert_alignment (verified_entry);
368- }
369-
370-
371359address NativeJump::jump_destination () const {
372360 address dest = MacroAssembler::target_addr_for_insn (instruction_address ());
373361
@@ -437,45 +425,6 @@ bool NativeInstruction::is_stop() {
437425
438426// -------------------------------------------------------------------
439427
440- // MT-safe inserting of a jump over a jump or a nop (used by
441- // nmethod::make_not_entrant)
442-
443- void NativeJump::patch_verified_entry (address entry, address verified_entry, address dest) {
444-
445- assert (dest == SharedRuntime::get_handle_wrong_method_stub (), " expected fixed destination of patch" );
446-
447- assert (nativeInstruction_at (verified_entry)->is_jump_or_nop () ||
448- nativeInstruction_at (verified_entry)->is_sigill_not_entrant (),
449- " riscv cannot replace non-jump with jump" );
450-
451- check_verified_entry_alignment (entry, verified_entry);
452-
453- // Patch this nmethod atomically.
454- if (Assembler::reachable_from_branch_at (verified_entry, dest)) {
455- ptrdiff_t offset = dest - verified_entry;
456- guarantee (Assembler::is_simm21 (offset) && ((offset % 2 ) == 0 ),
457- " offset is too large to be patched in one jal instruction." ); // 1M
458-
459- uint32_t insn = 0 ;
460- address pInsn = (address)&insn;
461- Assembler::patch (pInsn, 31 , 31 , (offset >> 20 ) & 0x1 );
462- Assembler::patch (pInsn, 30 , 21 , (offset >> 1 ) & 0x3ff );
463- Assembler::patch (pInsn, 20 , 20 , (offset >> 11 ) & 0x1 );
464- Assembler::patch (pInsn, 19 , 12 , (offset >> 12 ) & 0xff );
465- Assembler::patch (pInsn, 11 , 7 , 0 ); // zero, no link jump
466- Assembler::patch (pInsn, 6 , 0 , 0b1101111 ); // j, (jal x0 offset)
467- Assembler::sd_instr (verified_entry, insn);
468- } else {
469- // We use an illegal instruction for marking a method as
470- // not_entrant.
471- NativeIllegalInstruction::insert (verified_entry);
472- }
473-
474- ICache::invalidate_range (verified_entry, instruction_size);
475- }
476-
477- // -------------------------------------------------------------------
478-
479428void NativeGeneralJump::insert_unconditional (address code_pos, address entry) {
480429 CodeBuffer cb (code_pos, instruction_size);
481430 MacroAssembler a (&cb);
0 commit comments