On Mon, 29 Jun 2026 12:51:04 GMT, Andrew Haley <[email protected]> wrote:
>> Replaced the handwritten power table with a loop using intpow().
>
> I was hoping for something a bit more like this:
>
> uint32_t* pow_table = (uint32_t*) __ pc();
> __ code_section()->set_end(address(pow_table + 16));
> uint32_t n = 1;
> for (int i = 15; i >= 0; i--, n *= 31) {
> pow_table[i] = n;
> }
>
> which GCC optimizes away almost entirely, leaving just a few stores. Sorry, I
> should have been more explicit.
> Perhaps more important, though: we don't need 5 copies of the table.
Fixed.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/31674#discussion_r3500361731