RFR: 8277417: C1 LIR instruction for load-klass [v2]

Martin Doerr mdoerr at openjdk.java.net
Mon Nov 22 12:44:11 UTC 2021


On Fri, 19 Nov 2021 18:18:28 GMT, Roman Kennke <rkennke at openjdk.org> wrote:

>> src/hotspot/cpu/ppc/c1_LIRAssembler_ppc.cpp line 2737:
>> 
>>> 2735:   if (info != NULL) {
>>> 2736:     add_debug_info_for_null_check_here(info);
>>> 2737:   }
>> 
>> I think this is incorrect for AIX. Note that the first page is not read protected on that OS. To make it consistent with other places, I suggest:
>> 
>> diff --git a/src/hotspot/cpu/ppc/c1_LIRAssembler_ppc.cpp b/src/hotspot/cpu/ppc/c1_LIRAssembler_ppc.cpp
>> index a772e48f3be..23e03cb36e3 100644
>> --- a/src/hotspot/cpu/ppc/c1_LIRAssembler_ppc.cpp
>> +++ b/src/hotspot/cpu/ppc/c1_LIRAssembler_ppc.cpp
>> @@ -2733,7 +2733,11 @@ void LIR_Assembler::emit_load_klass(LIR_OpLoadKlass* op) {
>>  
>>    CodeEmitInfo* info = op->info();
>>    if (info != NULL) {
>> -    add_debug_info_for_null_check_here(info);
>> +    if (!os::zero_page_read_protected() || !ImplicitNullChecks) {
>> +      explicit_null_check(obj, info);
>> +    } else {
>> +      add_debug_info_for_null_check_here(info);
>> +    }
>>    }
>>  
>>    if (UseCompressedClassPointers) {
>
> Thank you! I pushed a fix for that.

Unfortunately, we have the `info != NULL` check twice, now. Otherwise, good.

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

PR: https://git.openjdk.java.net/jdk/pull/6464


More information about the hotspot-dev mailing list