@@ -684,7 +684,7 @@ static inline bool target_needs_far_branch(address addr) {
684
684
return !CodeCache::is_non_nmethod (addr);
685
685
}
686
686
687
- void MacroAssembler::far_call (Address entry, CodeBuffer *cbuf, Register tmp) {
687
+ void MacroAssembler::far_call (Address entry, Register tmp) {
688
688
assert (ReservedCodeCacheSize < 4 *G, " branch out of range" );
689
689
assert (CodeCache::find_blob (entry.target ()) != NULL ,
690
690
" destination of far call not found in code cache" );
@@ -697,15 +697,13 @@ void MacroAssembler::far_call(Address entry, CodeBuffer *cbuf, Register tmp) {
697
697
// the code cache cannot exceed 2Gb (ADRP limit is 4GB).
698
698
adrp (tmp, entry, offset);
699
699
add (tmp, tmp, offset);
700
- if (cbuf) cbuf->set_insts_mark ();
701
700
blr (tmp);
702
701
} else {
703
- if (cbuf) cbuf->set_insts_mark ();
704
702
bl (entry);
705
703
}
706
704
}
707
705
708
- int MacroAssembler::far_jump (Address entry, CodeBuffer *cbuf, Register tmp) {
706
+ int MacroAssembler::far_jump (Address entry, Register tmp) {
709
707
assert (ReservedCodeCacheSize < 4 *G, " branch out of range" );
710
708
assert (CodeCache::find_blob (entry.target ()) != NULL ,
711
709
" destination of far call not found in code cache" );
@@ -719,10 +717,8 @@ int MacroAssembler::far_jump(Address entry, CodeBuffer *cbuf, Register tmp) {
719
717
// the code cache cannot exceed 2Gb (ADRP limit is 4GB).
720
718
adrp (tmp, entry, offset);
721
719
add (tmp, tmp, offset);
722
- if (cbuf) cbuf->set_insts_mark ();
723
720
br (tmp);
724
721
} else {
725
- if (cbuf) cbuf->set_insts_mark ();
726
722
b (entry);
727
723
}
728
724
return pc () - start;
@@ -882,7 +878,7 @@ static bool is_always_within_branch_range(Address entry) {
882
878
883
879
// Maybe emit a call via a trampoline. If the code cache is small
884
880
// trampolines won't be emitted.
885
- address MacroAssembler::trampoline_call (Address entry, CodeBuffer* cbuf ) {
881
+ address MacroAssembler::trampoline_call (Address entry) {
886
882
assert (entry.rspec ().type () == relocInfo::runtime_call_type
887
883
|| entry.rspec ().type () == relocInfo::opt_virtual_call_type
888
884
|| entry.rspec ().type () == relocInfo::static_call_type
@@ -908,13 +904,12 @@ address MacroAssembler::trampoline_call(Address entry, CodeBuffer* cbuf) {
908
904
target = pc ();
909
905
}
910
906
911
- if (cbuf) cbuf-> set_insts_mark ();
907
+ address call_pc = pc ();
912
908
relocate (entry.rspec ());
913
909
bl (target);
914
910
915
- // just need to return a non-null address
916
911
postcond (pc () != badAddress);
917
- return pc () ;
912
+ return call_pc ;
918
913
}
919
914
920
915
// Emit a trampoline stub for a call to a target which is too far away.
0 commit comments