On Wed, 25 Feb 2026 20:05:02 GMT, Ben Perez <[email protected]> wrote:
>> Note that in a few places I've had to push back dead registers so that they
>> can be reused. This is necessary because the live ranges for some registers
>> partailly overlap.
>>
>> It's much better if you don't do that: instead, write a structured
>> assembly-language program in which registers are allocated in scopes as
>> needed, as I've done in the section which begins like this:
>>
>>
>> // Load input arrays and modulus
>> {
>> auto r = regs.begin();
>> Register a_ptr = *r++, mod_ptr = *r++;
>>
>>
>> here, the register that contain`a_ptr` and `mod_ptr` are taken from the
>> outer block, and are free for reuse when the inner block exits.
>>
>> I hope the advantages of this style are clear: the program is easier to
>> write, to maintain, and much less risky. Also, and most importantly for me,
>> it's much easier to review!
>
> Thanks for taking the time to write all this out! Will do a refactor and
> integrate these changes shortly
Don't be inhibited from changing what I wrote, if it makes sense to do so.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27946#discussion_r2857913821