Skip to content

Commit bdd64d6

Browse files
author
Andrew Haley
committedJun 10, 2022
8288181: AArch64: clean up out-of-date comments
Reviewed-by: shade
1 parent 5d0e8b6 commit bdd64d6

7 files changed

+13
-18
lines changed
 

‎src/hotspot/cpu/aarch64/c1_FrameMap_aarch64.cpp

-2
Original file line numberDiff line numberDiff line change
@@ -300,8 +300,6 @@ void FrameMap::initialize() {
300300

301301

302302
Address FrameMap::make_new_address(ByteSize sp_offset) const {
303-
// for rbp, based address use this:
304-
// return Address(rbp, in_bytes(sp_offset) - (framesize() - 2) * 4);
305303
return Address(sp, in_bytes(sp_offset));
306304
}
307305

‎src/hotspot/cpu/aarch64/c1_MacroAssembler_aarch64.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ void C1_MacroAssembler::verified_entry(bool breakAtEntry) {
313313
}
314314

315315
void C1_MacroAssembler::load_parameter(int offset_in_words, Register reg) {
316-
// rbp, + 0: link
316+
// rfp, + 0: link
317317
// + 1: return address
318318
// + 2: argument with offset 0
319319
// + 3: argument with offset 1

‎src/hotspot/cpu/aarch64/frame_aarch64.inline.hpp

+6-9
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@ inline frame frame::sender_for_compiled_frame(RegisterMap* map) const {
444444
assert(oop_map() == NULL || !oop_map()->has_any(OopMapValue::callee_saved_value), "callee-saved value in compiled frame");
445445
}
446446

447-
// Since the prolog does the save and restore of EBP there is no oopmap
447+
// Since the prolog does the save and restore of FP there is no oopmap
448448
// for it so we must fill in its location as if there was an oopmap entry
449449
// since if our caller was compiled code there could be live jvm state in it.
450450
update_map_with_saved_link(map, saved_fp_addr);
@@ -464,14 +464,11 @@ inline frame frame::sender_for_compiled_frame(RegisterMap* map) const {
464464

465465
template <typename RegisterMapT>
466466
void frame::update_map_with_saved_link(RegisterMapT* map, intptr_t** link_addr) {
467-
// The interpreter and compiler(s) always save EBP/RBP in a known
468-
// location on entry. We must record where that location is
469-
// so this if EBP/RBP was live on callout from c2 we can find
470-
// the saved copy no matter what it called.
471-
472-
// Since the interpreter always saves EBP/RBP if we record where it is then
473-
// we don't have to always save EBP/RBP on entry and exit to c2 compiled
474-
// code, on entry will be enough.
467+
// The interpreter and compiler(s) always save FP in a known
468+
// location on entry. C2-compiled code uses FP as an allocatable
469+
// callee-saved register. We must record where that location is so
470+
// that if FP was live on callout from c2 we can find the saved copy.
471+
475472
map->set_location(rfp->as_VMReg(), (address) link_addr);
476473
// this is weird "H" ought to be at a higher address however the
477474
// oopMaps seems to have the "H" regs at the same address and the

‎src/hotspot/cpu/aarch64/gc/g1/g1BarrierSetAssembler_aarch64.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ void G1BarrierSetAssembler::g1_write_barrier_pre(MacroAssembler* masm,
162162
// that checks that the *(rfp+frame::interpreter_frame_last_sp) == NULL.
163163
//
164164
// If we care generating the pre-barrier without a frame (e.g. in the
165-
// intrinsified Reference.get() routine) then ebp might be pointing to
165+
// intrinsified Reference.get() routine) then rfp might be pointing to
166166
// the caller frame and so this check will most likely fail at runtime.
167167
//
168168
// Expanding the call directly bypasses the generation of the check.

‎src/hotspot/cpu/aarch64/gc/shenandoah/shenandoahBarrierSetAssembler_aarch64.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ void ShenandoahBarrierSetAssembler::satb_write_barrier_pre(MacroAssembler* masm,
159159
// that checks that the *(rfp+frame::interpreter_frame_last_sp) == NULL.
160160
//
161161
// If we care generating the pre-barrier without a frame (e.g. in the
162-
// intrinsified Reference.get() routine) then ebp might be pointing to
162+
// intrinsified Reference.get() routine) then rfp might be pointing to
163163
// the caller frame and so this check will most likely fail at runtime.
164164
//
165165
// Expanding the call directly bypasses the generation of the check.

‎src/hotspot/cpu/aarch64/sharedRuntime_aarch64.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ class SimpleRuntimeFrame {
8181
// so that it agrees with the frame sender code.
8282
// we don't expect any arg reg save area so aarch64 asserts that
8383
// frame::arg_reg_save_area_bytes == 0
84-
rbp_off = 0,
85-
rbp_off2,
84+
rfp_off = 0,
85+
rfp_off2,
8686
return_off, return_off2,
8787
framesize
8888
};
@@ -2756,7 +2756,7 @@ RuntimeStub* SharedRuntime::generate_resolve_blob(address destination, const cha
27562756
}
27572757

27582758
#ifdef COMPILER2
2759-
// This is here instead of runtime_x86_64.cpp because it uses SimpleRuntimeFrame
2759+
// This is here instead of runtime_aarch64_64.cpp because it uses SimpleRuntimeFrame
27602760
//
27612761
//------------------------------generate_exception_blob---------------------------
27622762
// creates exception blob at the end

‎src/hotspot/cpu/aarch64/templateTable_aarch64.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -3772,7 +3772,7 @@ void TemplateTable::athrow() {
37723772
// [monitor entry]
37733773
// [frame data ] <--- monitor block bot
37743774
// ...
3775-
// [saved rbp ] <--- rbp
3775+
// [saved rfp ] <--- rfp
37763776
void TemplateTable::monitorenter()
37773777
{
37783778
transition(atos, vtos);

0 commit comments

Comments
 (0)
Please sign in to comment.