diff --git a/src/hotspot/cpu/s390/c2_MacroAssembler_s390.cpp b/src/hotspot/cpu/s390/c2_MacroAssembler_s390.cpp index c8393fe0e6097..68acebb01e0c3 100644 --- a/src/hotspot/cpu/s390/c2_MacroAssembler_s390.cpp +++ b/src/hotspot/cpu/s390/c2_MacroAssembler_s390.cpp @@ -42,13 +42,6 @@ void C2_MacroAssembler::fast_unlock_lightweight(Register obj, Register box, Regi compiler_fast_unlock_lightweight_object(obj, box, temp1, temp2); } -void C2_MacroAssembler::load_narrow_klass_compact_c2(Register dst, Address src) { - // 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 -} - //------------------------------------------------------ // Special String Intrinsics. Implementation //------------------------------------------------------ diff --git a/src/hotspot/cpu/s390/c2_MacroAssembler_s390.hpp b/src/hotspot/cpu/s390/c2_MacroAssembler_s390.hpp index 26c3c9a2bb563..aecb483f0a611 100644 --- a/src/hotspot/cpu/s390/c2_MacroAssembler_s390.hpp +++ b/src/hotspot/cpu/s390/c2_MacroAssembler_s390.hpp @@ -33,8 +33,6 @@ void fast_lock_lightweight(Register obj, Register box, Register temp1, Register temp2); void fast_unlock_lightweight(Register obj, Register box, Register temp1, Register temp2); - void load_narrow_klass_compact_c2(Register dst, Address src); - //------------------------------------------- // Special String Intrinsics Implementation. //------------------------------------------- diff --git a/src/hotspot/cpu/s390/s390.ad b/src/hotspot/cpu/s390/s390.ad index e1a98139992f8..cbcab22c90105 100644 --- a/src/hotspot/cpu/s390/s390.ad +++ b/src/hotspot/cpu/s390/s390.ad @@ -4726,11 +4726,13 @@ instruct loadNKlassCompactHeaders(iRegN dst, memory mem, flagsReg cr) %{ effect(KILL cr); ins_cost(MEMORY_REF_COST); format %{ "load_narrow_klass_compact $dst,$mem \t# compressed class ptr" %} - // TODO: size() + size(8); // (z_l)4 + (z_srl)4 ins_encode %{ __ block_comment("load_narrow_klass_compact_c2 {"); - __ load_narrow_klass_compact_c2($dst$$Register, $mem$$Address); + __ z_l($dst$$Register, $mem$$Address); + __ z_srl($dst$$Register, markWord::klass_shift); __ block_comment("} load_narrow_klass_compact"); + %} ins_pipe(pipe_class_dummy); %}