diff --git a/src/hotspot/cpu/s390/c2_MacroAssembler_s390.cpp b/src/hotspot/cpu/s390/c2_MacroAssembler_s390.cpp index 957c89af3fc..3bf9ab8dd82 100644 --- a/src/hotspot/cpu/s390/c2_MacroAssembler_s390.cpp +++ b/src/hotspot/cpu/s390/c2_MacroAssembler_s390.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2026, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2017, 2024 SAP SE. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -42,10 +42,12 @@ void C2_MacroAssembler::fast_unlock(Register obj, Register box, Register temp1, } void C2_MacroAssembler::load_narrow_klass_compact_c2(Register dst, Address src) { + BLOCK_COMMENT("load_narrow_klass_compact_c2 {"); // The incoming address is pointing into obj-start + klass_offset_in_bytes. We need to extract // obj-start, so that we can load from the object's mark-word instead. z_lg(dst, src.plus_disp(-oopDesc::klass_offset_in_bytes())); - z_srlg(dst, dst, markWord::klass_shift); // TODO: could be z_sra + z_srlg(dst, dst, markWord::klass_shift); + BLOCK_COMMENT("} load_narrow_klass_compact_c2"); } //------------------------------------------------------ diff --git a/src/hotspot/cpu/s390/s390.ad b/src/hotspot/cpu/s390/s390.ad index 5f33cf4fa77..3d4abea7529 100644 --- a/src/hotspot/cpu/s390/s390.ad +++ b/src/hotspot/cpu/s390/s390.ad @@ -4816,17 +4816,15 @@ instruct loadNKlass(iRegN dst, memory mem) %{ ins_pipe(pipe_class_dummy); %} -instruct loadNKlassCompactHeaders(iRegN dst, memory mem, flagsReg cr) %{ +instruct loadNKlassCompactHeaders(iRegN dst, memory mem) %{ match(Set dst (LoadNKlass mem)); predicate(UseCompactObjectHeaders); - effect(KILL cr); ins_cost(MEMORY_REF_COST); format %{ "load_narrow_klass_compact $dst,$mem \t# compressed class ptr" %} - // TODO: size() + // z_lg (6 bytes) + z_srlg (6 bytes); neither instruction modifies the CC. + size(12); ins_encode %{ - __ block_comment("load_narrow_klass_compact_c2 {"); __ load_narrow_klass_compact_c2($dst$$Register, $mem$$Address); - __ block_comment("} load_narrow_klass_compact"); %} ins_pipe(pipe_class_dummy); %}