RFR: 8365911: AArch64: Fix encoding error in sve_cpy for negative floats
Emanuel Peter
epeter at openjdk.org
Wed Sep 3 12:39:44 UTC 2025
On Wed, 3 Sep 2025 07:19:06 GMT, erifan <duke at openjdk.org> wrote:
>>> 1. sve `cpy` and `fcpy` are actually two different instructions, and distinguishing them might be clearer.
>>
>> That's a fair point, but the Arch64 name for all four instructions is CPY, and they are distinguished by their operands. Deviation from the names in the Reference Manual is occasionally necessary, but it makes life painful for maintainers when they have to search for what we've called an instruction they want to use.
>>
>>> 2. sve `cpy` 's imm8 is an **int** , while `fcpy` 's imm8 is an **fp8** .
>>
>> Yes, that's right.
>>
>>> While some encoding code can be reused, separating the encodings makes the code clearer.
>>
>> I don't agree that it makes the code clearer. In fact, tight factoring emphasizes the fact that these instructions are similar, and explicitly shows where they are different.
>>
>> It is true that I have a strong bias against copy-and-paste programming.
>>
>>> I think both implementations are fine. If you think it's better to not refactor, I'll revert.
>>
>> I do. Thank you.
>
>> I do. Thank you.
>
> Ok, I have reverted the refactoring. Please help take another look, thanks~
@erifan I'm running some internal testing - though we don't have SVE machines so you are responsible to make sure it is adequately tested for that ;)
-------------
PR Comment: https://git.openjdk.org/jdk/pull/26951#issuecomment-3249077329
More information about the hotspot-compiler-dev
mailing list