RFR: 8266609: AArch64: include FP/LR space in LIR_Assembler::initial_frame_size_in_bytes()
Andrew Haley
aph at openjdk.java.net
Fri May 7 08:35:50 UTC 2021
On Fri, 7 May 2021 01:48:43 GMT, Nick Gasson <ngasson at openjdk.org> wrote:
> > This calculation is the same as x86. Can you explain why it has to be changed on AArch64, but should not be changed on x86?
>
> On AArch64 `C1_MacroAssembler::build_frame()` delegates to `MacroAssembler::build_frame()` which expects the total frame size. On x86 we build the frame directly in C1_MacroAssembler by doing roughly `__ push(rbp); __ decrement(rsp, frame_size_in_bytes);` so it's natural that `frame_size_in_bytes` shouldn't include the space for the frame pointer and the return address (which was already pushed by the `call` instruction). If we made this change on x86 we'd need to subtract `2*wordSize` from each increment/decrement of rsp which seems like a net loss.
OK, makes snse.
-------------
PR: https://git.openjdk.java.net/jdk/pull/3898
More information about the hotspot-dev
mailing list