RFR: 8365911: AArch64: Fix encoding error in sve_cpy for negative floats
Andrew Haley
aph at openjdk.org
Tue Sep 2 08:12:42 UTC 2025
On Tue, 2 Sep 2025 03:01:36 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.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/26951#issuecomment-3244259237
More information about the hotspot-compiler-dev
mailing list