RFR: 8335367: [s390] Add support for load immediate on condition instructions. [v2]

Amit Kumar amitkumar at openjdk.org
Fri Nov 29 08:23:41 UTC 2024


On Fri, 29 Nov 2024 07:48:45 GMT, Lutz Schmidt <lucy at openjdk.org> wrote:

>> Manjunath S Matti. has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Update src/hotspot/cpu/s390/assembler_s390.hpp
>>   
>>   Update the comments as suggested by Amit Kumar
>>   
>>   Co-authored-by: Amit Kumar <amitlocham09 at icloud.com>
>
> src/hotspot/cpu/s390/macroAssembler_s390.cpp line 3291:
> 
>> 3289:   bind(L_failure);
>> 3290: 
>> 3291:   z_lghi(r_result, 1);
> 
> This lghi deserves a conversion to locghi. Furthermore, without checking for feature availability, the code will require z13 or newer. Is that intended?

yeah, actually that was my intention but then I find out that codepath which jumps to `L_failure` not comes with setting cc to 2. 


  testbit(r_array_index, 63);
  z_bfalse(L_failure);



  testbit(r_bitmap, (bit + 1) & Klass::SECONDARY_SUPERS_TABLE_MASK);
  z_bfalse(L_failure);


So other solution which I could think of is, to assume that search will fail and load `1` at the start 

  // Initialize r_result with 0 (indicating success). If searching fails, r_result will be loaded
  // with 1 (failure) at the end of this method.
  clear_reg(r_result, true /* whole_reg */, false /* set_cc */); // r_result = 0


But then I remembered this: https://github.com/openjdk/jdk/pull/19544/files#r1660693537

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

PR Review Comment: https://git.openjdk.org/jdk/pull/22058#discussion_r1863123743


More information about the hotspot-dev mailing list