8024379: Adapt PPC64 port to 8003424
Reviewed-by: coleenp
This commit is contained in:
parent
1a700c9216
commit
c42cf5c3fd
@ -2382,17 +2382,11 @@ void MacroAssembler::get_vm_result_2(Register metadata_result) {
|
|||||||
|
|
||||||
void MacroAssembler::encode_klass_not_null(Register dst, Register src) {
|
void MacroAssembler::encode_klass_not_null(Register dst, Register src) {
|
||||||
if (src == noreg) src = dst;
|
if (src == noreg) src = dst;
|
||||||
if (Universe::narrow_klass_base() != NULL) {
|
assert(Universe::narrow_klass_base() != NULL, "Base should be initialized");
|
||||||
// heapbased
|
load_const(R0, Universe::narrow_klass_base());
|
||||||
assert(Universe::narrow_klass_shift() != 0, "sanity");
|
sub(dst, src, R0);
|
||||||
sub(dst, src, R30);
|
if (Universe::narrow_klass_shift() != 0) {
|
||||||
srdi(dst, dst, Universe::narrow_klass_shift());
|
|
||||||
} else if (Universe::narrow_klass_shift() != 0) {
|
|
||||||
// zerobased
|
|
||||||
srdi(dst, src, Universe::narrow_klass_shift());
|
srdi(dst, src, Universe::narrow_klass_shift());
|
||||||
} else if (src != dst) {
|
|
||||||
// unscaled
|
|
||||||
mr(dst, src);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2407,18 +2401,14 @@ void MacroAssembler::store_klass(Register dst_oop, Register klass, Register ck)
|
|||||||
|
|
||||||
void MacroAssembler::decode_klass_not_null(Register dst, Register src) {
|
void MacroAssembler::decode_klass_not_null(Register dst, Register src) {
|
||||||
if (src == noreg) src = dst;
|
if (src == noreg) src = dst;
|
||||||
if (Universe::narrow_klass_base() != NULL) {
|
Register shifted_src = src;
|
||||||
// heapbased
|
assert(Universe::narrow_klass_base() != NULL, "Base should be initialized");
|
||||||
assert(Universe::narrow_klass_shift() != 0, "sanity");
|
if (Universe::narrow_klass_shift() != 0) {
|
||||||
sldi(dst, src, Universe::narrow_klass_shift());
|
shifted_src = dst;
|
||||||
add(dst, dst, R30);
|
sldi(shifted_src, src, Universe::narrow_klass_shift());
|
||||||
} else if (Universe::narrow_klass_shift() != 0) {
|
|
||||||
// zerobased
|
|
||||||
sldi(dst, src, Universe::narrow_klass_shift());
|
|
||||||
} else if (src != dst) {
|
|
||||||
// unscaled
|
|
||||||
mr(dst, src);
|
|
||||||
}
|
}
|
||||||
|
load_const(R0, Universe::narrow_klass_base());
|
||||||
|
add(dst, shifted_src, R0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MacroAssembler::load_klass(Register dst, Register src) {
|
void MacroAssembler::load_klass(Register dst, Register src) {
|
||||||
@ -2441,7 +2431,13 @@ void MacroAssembler::load_klass_with_trap_null_check(Register dst, Register src)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void MacroAssembler::reinit_heapbase(Register d, Register tmp) {
|
void MacroAssembler::reinit_heapbase(Register d, Register tmp) {
|
||||||
if (UseCompressedOops || UseCompressedKlassPointers) {
|
if (Universe::heap() != NULL) {
|
||||||
|
if (Universe::narrow_oop_base() == NULL) {
|
||||||
|
Assembler::xorr(R30, R30, R30);
|
||||||
|
} else {
|
||||||
|
load_const(R30, Universe::narrow_ptrs_base(), tmp);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
load_const(R30, Universe::narrow_ptrs_base_addr(), tmp);
|
load_const(R30, Universe::narrow_ptrs_base_addr(), tmp);
|
||||||
ld(R30, 0, R30);
|
ld(R30, 0, R30);
|
||||||
}
|
}
|
||||||
|
@ -58,7 +58,7 @@ void Relocation::pd_set_data_value(address x, intptr_t o, bool verify_only) {
|
|||||||
assert(type() == relocInfo::oop_type || type() == relocInfo::metadata_type,
|
assert(type() == relocInfo::oop_type || type() == relocInfo::metadata_type,
|
||||||
"how to encode else?");
|
"how to encode else?");
|
||||||
narrowOop no = (type() == relocInfo::oop_type) ?
|
narrowOop no = (type() == relocInfo::oop_type) ?
|
||||||
oopDesc::encode_heap_oop((oop)x) : oopDesc::encode_klass((Klass*)x);
|
oopDesc::encode_heap_oop((oop)x) : Klass::encode_klass((Klass*)x);
|
||||||
nativeMovConstReg_at(addr())->set_narrow_oop(no, code());
|
nativeMovConstReg_at(addr())->set_narrow_oop(no, code());
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user