RFR: 8291003: ARM32: constant_table.size assertion

Aleksey Shipilev shade at openjdk.org
Thu Jul 28 15:17:56 UTC 2022


On Thu, 28 Jul 2022 08:24:22 GMT, Boris Ulasevich <bulasevich at openjdk.org> wrote:

> This change fixes assertion condition as per the recent [JDK-8287373](https://bugs.openjdk.org/browse/JDK-8287373) change: the size of constants section is aligned up according to the settings of the next section (instructions section).

> CodeSection::align_at_start(consts_section->size(), CodeBuffer::SECT_INSTS);
> > This is equivalent to the following, right?
> 
> Yes. I like your change in codeBuffer.hpp. Though your change in arm.ad brings a little bit too much details. And mine is shorter :) What do you think?
> 
> ```
> -  int consts_size = __ code()->insts()->align_at_start(consts_section->size());
> +  int consts_size = CodeSection::align_at_start(consts_section->size(), CodeBuffer::SECT_INSTS);
> ```

What confused me is calling `code()->insts()->align_at_start`. I think explicitly calling out the section index as the `align_at_start` parameter is cleaner. But I don't care much, really.

-------------

PR: https://git.openjdk.org/jdk/pull/9672


More information about the hotspot-compiler-dev mailing list