Skip to content

Commit

Permalink
c1_macroAssembler
Browse files Browse the repository at this point in the history
  • Loading branch information
offamitkumar committed Oct 21, 2024
1 parent 59981d9 commit 122f3a6
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions src/hotspot/cpu/s390/c1_MacroAssembler_s390.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -173,17 +173,23 @@ void C1_MacroAssembler::try_allocate(

void C1_MacroAssembler::initialize_header(Register obj, Register klass, Register len, Register Rzero, Register t1) {
assert_different_registers(obj, klass, len, t1, Rzero);
// This assumes that all prototype bits fit in an int32_t.
load_const_optimized(t1, (intx)markWord::prototype().value());
z_stg(t1, Address(obj, oopDesc::mark_offset_in_bytes()));

if (UseCompactObjectHeaders) {
z_lg(t1, Address(klass, in_bytes(Klass::prototype_header_offset())));
z_stg(t1, Address(obj, oopDesc::mark_offset_in_bytes()));
} else {
// This assumes that all prototype bits fit in an int32_t.
load_const_optimized(t1, (intx) markWord::prototype().value());
z_stg(t1, Address(obj, oopDesc::mark_offset_in_bytes()));
store_klass(klass, obj, t1);
}

if (len->is_valid()) {
// Length will be in the klass gap, if one exists.
z_st(len, Address(obj, arrayOopDesc::length_offset_in_bytes()));
} else if (UseCompressedClassPointers) {
} else if (UseCompressedClassPointers && !UseCompactObjectHeaders) {
store_klass_gap(Rzero, obj); // Zero klass gap for compressed oops.
}
store_klass(klass, obj, t1);
}

void C1_MacroAssembler::initialize_body(Register objectFields, Register len_in_bytes, Register Rzero) {
Expand Down

0 comments on commit 122f3a6

Please sign in to comment.