mirror of
https://github.com/openjdk/jdk.git
synced 2026-02-13 03:45:19 +00:00
8278036: Saving rscratch1 is optional in MacroAssembler::verify_heapbase
Reviewed-by: xliu, phh, coleenp
This commit is contained in:
parent
6287ae3707
commit
2920ce5487
@ -377,7 +377,7 @@ class AddressLiteral {
|
||||
private:
|
||||
|
||||
address target() { return _target; }
|
||||
bool is_lval() { return _is_lval; }
|
||||
bool is_lval() const { return _is_lval; }
|
||||
|
||||
relocInfo::relocType reloc() const { return _rspec.type(); }
|
||||
const RelocationHolder& rspec() const { return _rspec; }
|
||||
|
||||
@ -4651,12 +4651,19 @@ void MacroAssembler::verify_heapbase(const char* msg) {
|
||||
assert (Universe::heap() != NULL, "java heap should be initialized");
|
||||
if (CheckCompressedOops) {
|
||||
Label ok;
|
||||
push(rscratch1); // cmpptr trashes rscratch1
|
||||
cmpptr(r12_heapbase, ExternalAddress((address)CompressedOops::ptrs_base_addr()));
|
||||
const auto src2 = ExternalAddress((address)CompressedOops::ptrs_base_addr());
|
||||
assert(!src2.is_lval(), "should not be lval");
|
||||
const bool is_src2_reachable = reachable(src2);
|
||||
if (!is_src2_reachable) {
|
||||
push(rscratch1); // cmpptr trashes rscratch1
|
||||
}
|
||||
cmpptr(r12_heapbase, src2);
|
||||
jcc(Assembler::equal, ok);
|
||||
STOP(msg);
|
||||
bind(ok);
|
||||
pop(rscratch1);
|
||||
if (!is_src2_reachable) {
|
||||
pop(rscratch1);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user