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

Roman Kennke rkennke at openjdk.java.net
Fri Nov 19 18:22:41 UTC 2021


On Fri, 19 Nov 2021 17:25:31 GMT, Martin Doerr <mdoerr at openjdk.org> wrote:

>> Roman Kennke has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Fix null-check on PPC
>
> 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.

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

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


More information about the hotspot-dev mailing list