On Wed, 21 Jan 2026 14:10:39 GMT, Andrew Haley <[email protected]> wrote:

>> Eric Fang has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   Extract some helper functions for better readability
>
> src/hotspot/cpu/aarch64/c2_MacroAssembler_aarch64.cpp line 1965:
> 
>> 1963: // Helper function to decode min/max reduction operation properties
>> 1964: static void decode_minmax_reduction_opc(int opc, bool& is_min, bool& 
>> is_unsigned,
>> 1965:                                         Assembler::Condition& cond) {
> 
> Suggestion:
> 
>                                         Condition cond) {

Considering that this function is only used by this file and does not call any 
instructions, I made it a **file-scope static** function. And as we don't 
declare `using Assembler::Condition;` in this file, so we have to use 
`Assembler::Condition&` here, or we'll get the following error:

jdk/src/hotspot/cpu/aarch64/c2_MacroAssembler_aarch64.cpp:1965:41: error: 
‘Condition’ has not been declared
 1965 |                                         Condition& cond) {

As for `&`, this is a reference parameter.

To remove `Assembler::`, we can
1. Declare `using Assembler::Condition;` in this file.
2. Make this function as a private method of `C2_MacroAssembler`.

WDYT ?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/28693#discussion_r2715142364

Reply via email to