8247350: [aarch64] assert(false) failed: wrong size of mach node

Use movptr() to load address of string

Reviewed-by: adinn, azeemj
This commit is contained in:
Vladimir Kozlov 2020-06-12 14:33:20 -07:00
parent e68f81ab4c
commit 241f401815
2 changed files with 13 additions and 3 deletions

View File

@ -1330,7 +1330,7 @@ void MacroAssembler::verify_oop(Register reg, const char* s) {
stp(rscratch2, lr, Address(pre(sp, -2 * wordSize)));
mov(r0, reg);
mov(rscratch1, (address)b);
movptr(rscratch1, (uintptr_t)(address)b);
// call indirectly to solve generation ordering problem
lea(rscratch2, ExternalAddress(StubRoutines::verify_oop_subroutine_entry_address()));
@ -1366,7 +1366,7 @@ void MacroAssembler::verify_oop_addr(Address addr, const char* s) {
} else {
ldr(r0, addr);
}
mov(rscratch1, (address)b);
movptr(rscratch1, (uintptr_t)(address)b);
// call indirectly to solve generation ordering problem
lea(rscratch2, ExternalAddress(StubRoutines::verify_oop_subroutine_entry_address()));

View File

@ -30,6 +30,7 @@
#include "code/debugInfoRec.hpp"
#include "compiler/compileBroker.hpp"
#include "compiler/compilerDirectives.hpp"
#include "compiler/disassembler.hpp"
#include "compiler/oopMap.hpp"
#include "gc/shared/barrierSet.hpp"
#include "gc/shared/c2/barrierSetC2.hpp"
@ -1614,8 +1615,17 @@ void PhaseOutput::fill_buffer(CodeBuffer* cb, uint* blk_starts) {
}
#ifdef ASSERT
if (n->size(C->regalloc()) < (current_offset-instr_offset)) {
uint n_size = n->size(C->regalloc());
if (n_size < (current_offset-instr_offset)) {
MachNode* mach = n->as_Mach();
n->dump();
mach->dump_format(C->regalloc(), tty);
tty->print_cr(" n_size (%d), current_offset (%d), instr_offset (%d)", n_size, current_offset, instr_offset);
Disassembler::decode(cb->insts_begin() + instr_offset, cb->insts_begin() + current_offset + 1, tty);
tty->print_cr(" ------------------- ");
BufferBlob* blob = this->scratch_buffer_blob();
address blob_begin = blob->content_begin();
Disassembler::decode(blob_begin, blob_begin + n_size + 1, tty);
assert(false, "wrong size of mach node");
}
#endif