557 public:
558 bool call_far_patchable(address target, int64_t toc_offset);
559 static bool is_call_far_patchable_at(address inst_start); // All supported forms of patchable calls.
560 static bool is_call_far_patchable_pcrelative_at(address inst_start); // Pc-relative call with leading nops.
561 static bool is_call_far_pcrelative(address instruction_addr); // Pure far pc-relative call, with one leading size adjustment nop.
562 static void set_dest_of_call_far_patchable_at(address inst_start, address target, int64_t toc_offset);
563 static address get_dest_of_call_far_patchable_at(address inst_start, address toc_start);
564
565 void align_call_far_patchable(address pc);
566
567 // PCrelative TOC access.
568
569 // This value is independent of code position - constant for the lifetime of the VM.
570 static int call_far_patchable_size() {
571 return load_const_from_toc_size() + call_byregister_size();
572 }
573
574 static int call_far_patchable_ret_addr_offset() { return call_far_patchable_size(); }
575
576 static bool call_far_patchable_requires_alignment_nop(address pc) {
577 int size = call_far_patchable_size();
578 return ((intptr_t)(pc + size) & 0x03L) != 0;
579 }
580
581 // END OF PCrelative TOC access.
582
583 static int jump_byregister_size() { return 2; }
584 static int jump_pcrelative_size() { return 4; }
585 static int jump_far_pcrelative_size() { return 6; }
586 static int call_byregister_size() { return 2; }
587 static int call_pcrelative_size() { return 4; }
588 static int call_far_pcrelative_size() { return 2 + 6; } // Prepend each BRASL with a nop.
589 static int call_far_pcrelative_size_raw() { return 6; } // Prepend each BRASL with a nop.
590
591 //
592 // Java utilities
593 //
594
595 // These routines should emit JVMTI PopFrame and ForceEarlyReturn handling code.
596 // The implementation is only non-empty for the InterpreterMacroAssembler,
|
557 public:
558 bool call_far_patchable(address target, int64_t toc_offset);
559 static bool is_call_far_patchable_at(address inst_start); // All supported forms of patchable calls.
560 static bool is_call_far_patchable_pcrelative_at(address inst_start); // Pc-relative call with leading nops.
561 static bool is_call_far_pcrelative(address instruction_addr); // Pure far pc-relative call, with one leading size adjustment nop.
562 static void set_dest_of_call_far_patchable_at(address inst_start, address target, int64_t toc_offset);
563 static address get_dest_of_call_far_patchable_at(address inst_start, address toc_start);
564
565 void align_call_far_patchable(address pc);
566
567 // PCrelative TOC access.
568
569 // This value is independent of code position - constant for the lifetime of the VM.
570 static int call_far_patchable_size() {
571 return load_const_from_toc_size() + call_byregister_size();
572 }
573
574 static int call_far_patchable_ret_addr_offset() { return call_far_patchable_size(); }
575
576 static bool call_far_patchable_requires_alignment_nop(address pc) {
577 if (!os::is_MP()) return false;
578 int size = call_far_patchable_size();
579 return ((intptr_t)(pc + size) & 0x03L) != 0;
580 }
581
582 // END OF PCrelative TOC access.
583
584 static int jump_byregister_size() { return 2; }
585 static int jump_pcrelative_size() { return 4; }
586 static int jump_far_pcrelative_size() { return 6; }
587 static int call_byregister_size() { return 2; }
588 static int call_pcrelative_size() { return 4; }
589 static int call_far_pcrelative_size() { return 2 + 6; } // Prepend each BRASL with a nop.
590 static int call_far_pcrelative_size_raw() { return 6; } // Prepend each BRASL with a nop.
591
592 //
593 // Java utilities
594 //
595
596 // These routines should emit JVMTI PopFrame and ForceEarlyReturn handling code.
597 // The implementation is only non-empty for the InterpreterMacroAssembler,
|