Skip to content

Commit

Permalink
s390 change
Browse files Browse the repository at this point in the history
  • Loading branch information
offamitkumar committed Nov 19, 2024
1 parent b12c5b4 commit 3327eef
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 11 deletions.
7 changes: 0 additions & 7 deletions src/hotspot/cpu/s390/c2_MacroAssembler_s390.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
//------------------------------------------------------
Expand Down
2 changes: 0 additions & 2 deletions src/hotspot/cpu/s390/c2_MacroAssembler_s390.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
//-------------------------------------------
Expand Down
6 changes: 4 additions & 2 deletions src/hotspot/cpu/s390/s390.ad
Original file line number Diff line number Diff line change
Expand Up @@ -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);
%}
Expand Down

0 comments on commit 3327eef

Please sign in to comment.