Skip to content

Commit

Permalink
8288181: AArch64: clean up out-of-date comments
Browse files Browse the repository at this point in the history
Reviewed-by: shade
  • Loading branch information
Andrew Haley committed Jun 10, 2022
1 parent 5d0e8b6 commit bdd64d6
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 18 deletions.
2 changes: 0 additions & 2 deletions src/hotspot/cpu/aarch64/c1_FrameMap_aarch64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -300,8 +300,6 @@ void FrameMap::initialize() {


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

Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/cpu/aarch64/c1_MacroAssembler_aarch64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ void C1_MacroAssembler::verified_entry(bool breakAtEntry) {
}

void C1_MacroAssembler::load_parameter(int offset_in_words, Register reg) {
// rbp, + 0: link
// rfp, + 0: link
// + 1: return address
// + 2: argument with offset 0
// + 3: argument with offset 1
Expand Down
15 changes: 6 additions & 9 deletions src/hotspot/cpu/aarch64/frame_aarch64.inline.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ inline frame frame::sender_for_compiled_frame(RegisterMap* map) const {
assert(oop_map() == NULL || !oop_map()->has_any(OopMapValue::callee_saved_value), "callee-saved value in compiled frame");
}

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

template <typename RegisterMapT>
void frame::update_map_with_saved_link(RegisterMapT* map, intptr_t** link_addr) {
// The interpreter and compiler(s) always save EBP/RBP in a known
// location on entry. We must record where that location is
// so this if EBP/RBP was live on callout from c2 we can find
// the saved copy no matter what it called.

// Since the interpreter always saves EBP/RBP if we record where it is then
// we don't have to always save EBP/RBP on entry and exit to c2 compiled
// code, on entry will be enough.
// The interpreter and compiler(s) always save FP in a known
// location on entry. C2-compiled code uses FP as an allocatable
// callee-saved register. We must record where that location is so
// that if FP was live on callout from c2 we can find the saved copy.

map->set_location(rfp->as_VMReg(), (address) link_addr);
// this is weird "H" ought to be at a higher address however the
// oopMaps seems to have the "H" regs at the same address and the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ void G1BarrierSetAssembler::g1_write_barrier_pre(MacroAssembler* masm,
// that checks that the *(rfp+frame::interpreter_frame_last_sp) == NULL.
//
// If we care generating the pre-barrier without a frame (e.g. in the
// intrinsified Reference.get() routine) then ebp might be pointing to
// intrinsified Reference.get() routine) then rfp might be pointing to
// the caller frame and so this check will most likely fail at runtime.
//
// Expanding the call directly bypasses the generation of the check.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ void ShenandoahBarrierSetAssembler::satb_write_barrier_pre(MacroAssembler* masm,
// that checks that the *(rfp+frame::interpreter_frame_last_sp) == NULL.
//
// If we care generating the pre-barrier without a frame (e.g. in the
// intrinsified Reference.get() routine) then ebp might be pointing to
// intrinsified Reference.get() routine) then rfp might be pointing to
// the caller frame and so this check will most likely fail at runtime.
//
// Expanding the call directly bypasses the generation of the check.
Expand Down
6 changes: 3 additions & 3 deletions src/hotspot/cpu/aarch64/sharedRuntime_aarch64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ class SimpleRuntimeFrame {
// so that it agrees with the frame sender code.
// we don't expect any arg reg save area so aarch64 asserts that
// frame::arg_reg_save_area_bytes == 0
rbp_off = 0,
rbp_off2,
rfp_off = 0,
rfp_off2,
return_off, return_off2,
framesize
};
Expand Down Expand Up @@ -2756,7 +2756,7 @@ RuntimeStub* SharedRuntime::generate_resolve_blob(address destination, const cha
}

#ifdef COMPILER2
// This is here instead of runtime_x86_64.cpp because it uses SimpleRuntimeFrame
// This is here instead of runtime_aarch64_64.cpp because it uses SimpleRuntimeFrame
//
//------------------------------generate_exception_blob---------------------------
// creates exception blob at the end
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/cpu/aarch64/templateTable_aarch64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3772,7 +3772,7 @@ void TemplateTable::athrow() {
// [monitor entry]
// [frame data ] <--- monitor block bot
// ...
// [saved rbp ] <--- rbp
// [saved rfp ] <--- rfp
void TemplateTable::monitorenter()
{
transition(atos, vtos);
Expand Down

1 comment on commit bdd64d6

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.