RFR: 8288971: AArch64: Clean up stack and register handling in interpreter [v2]

Andrew Haley aph at openjdk.org
Thu Jun 30 09:47:15 UTC 2022


On Wed, 29 Jun 2022 15:25:08 GMT, Andrew Dinn <adinn at openjdk.org> wrote:

>> Andrew Haley has updated the pull request incrementally with two additional commits since the last revision:
>> 
>>  - 8288971: AArch64: Clean up stack and register handling in interpreter
>>  - 8288971: AArch64: Clean up stack and register handling in interpreter
>
> src/hotspot/cpu/aarch64/abstractInterpreter_aarch64.cpp line 176:
> 
>> 174:   int max_stack = method->constMethod()->max_stack() + MAX2(3, Method::extra_stack_entries());
>> 175:   intptr_t* extended_sp = (intptr_t*) monbot  -
>> 176:     (max_stack * Interpreter::stackElementWords) -
> 
> You are correctly multiplying by Interpreter::stackElementWords here. However, I noticed that at line 93 the multiply has been omitted
> 
>   int size = overhead +
>          (callee_locals - callee_params) +
>          monitors * frame::interpreter_frame_monitor_size() +
> 
> It should really follow x86 and include the multiply:
> 
>   int size = overhead +
>          (callee_locals - callee_params) * Interpreter::stackElementWords +
>          monitors * frame::interpreter_frame_monitor_size() +
> 
> We only get away with this because Interpreter::stackElementWords is 1.
> 
> Perhaps you could correct that as part of this patch?

OK, done. Ta.

-------------

PR: https://git.openjdk.org/jdk/pull/9239


More information about the hotspot-dev mailing list