8257231: assert(!is_mcall || (call_returns[block->_pre_order] <= (uint) current_offset))

Reviewed-by: shade, chagedorn
This commit is contained in:
Patric Hedlin 2020-12-01 14:16:41 +00:00
parent eaf4db6b8b
commit e3d0f27031

View File

@ -1696,8 +1696,6 @@ void PhaseOutput::fill_buffer(CodeBuffer* cb, uint* blk_starts) {
n->emit(*cb, C->regalloc());
current_offset = cb->insts_size();
assert(!is_mcall || (call_returns[block->_pre_order] <= (uint) current_offset), "ret_addr_offset() not within emitted code");
// Above we only verified that there is enough space in the instruction section.
// However, the instruction may emit stubs that cause code buffer expansion.
// Bail out here if expansion failed due to a lack of code cache space.
@ -1705,6 +1703,9 @@ void PhaseOutput::fill_buffer(CodeBuffer* cb, uint* blk_starts) {
return;
}
assert(!is_mcall || (call_returns[block->_pre_order] <= (uint)current_offset),
"ret_addr_offset() not within emitted code");
#ifdef ASSERT
uint n_size = n->size(C->regalloc());
if (n_size < (current_offset-instr_offset)) {