Skip to content

Commit

Permalink
8291003: ARM32: constant_table.size assertion
Browse files Browse the repository at this point in the history
Reviewed-by: shade
  • Loading branch information
Boris Ulasevich committed Jul 29, 2022
1 parent cfe9026 commit 18cd16d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/hotspot/cpu/arm/arm.ad
Expand Up @@ -236,7 +236,8 @@ void MachConstantBaseNode::emit(CodeBuffer& cbuf, PhaseRegAlloc* ra_) const {

Register r = as_Register(ra_->get_encode(this));
CodeSection* consts_section = __ code()->consts();
int consts_size = consts_section->align_at_start(consts_section->size());
// constants section size is aligned according to the align_at_start settings of the next section
int consts_size = CodeSection::align_at_start(consts_section->size(), CodeBuffer::SECT_INSTS);
assert(constant_table.size() == consts_size, "must be: %d == %d", constant_table.size(), consts_size);

// Materialize the constant table base.
Expand Down
4 changes: 2 additions & 2 deletions src/hotspot/share/asm/codeBuffer.hpp
Expand Up @@ -261,12 +261,12 @@ class CodeSection {
// Slop between sections, used only when allocating temporary BufferBlob buffers.
static csize_t end_slop() { return MAX2((int)sizeof(jdouble), (int)CodeEntryAlignment); }

csize_t align_at_start(csize_t off, int section) const {
static csize_t align_at_start(csize_t off, int section) {
return (csize_t) align_up(off, alignment(section));
}

csize_t align_at_start(csize_t off) const {
return (csize_t) align_up(off, alignment(_index));
return align_at_start(off, _index);
}

// Ensure there's enough space left in the current section.
Expand Down

1 comment on commit 18cd16d

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.