RFR: 8345125: Aarch64: Add aarch64 backend for Float16 scalar operations

Bhavana Kilambi bkilambi at openjdk.org
Tue Feb 25 13:55:58 UTC 2025


On Tue, 25 Feb 2025 13:37:51 GMT, Andrew Haley <aph at openjdk.org> wrote:

>> This patch adds aarch64 backend for scalar FP16 operations namely - add, subtract, multiply, divide, fma, sqrt, min and max.
>
> test/hotspot/gtest/aarch64/aarch64-asmtest.py line 19:
> 
>> 17:         0x7e0, 0xfc0, 0x1f80, 0x3ff0, 0x7e00, 0x8000,
>> 18:         0x81ff, 0xc1ff, 0xc003, 0xc7ff, 0xdfff, 0xe03f,
>> 19:         0xe1ff, 0xf801, 0xfc00, 0xfc07, 0xff03, 0xfffe]
> 
> So here you've deleted the duplicated `0x7e00` (good) but also the not-duplicated `0xe10f`. Is `0xe10f` not valid?

Hi, yes `0xe10f` does not seem to be valid. While I tried generating the `asmtest.out.h` I ran into errors with this value -

aarch64ops.s:1105: Error: immediate out of range at operand 3 -- eor z6.h,z6.h,#0xe10f
aarch64ops.s:1123: Error: immediate out of range at operand 3 -- eor z3.h,z3.h,#0xe10f


So I looked it up here - https://gist.github.com/dinfuehr/51a01ac58c0b23e4de9aac313ed6a06a to see if this number is a legal immediate and looks like it isn't. Maybe it's just chance that this number wasn't generated before as an immediate operand and these errors didn't up till now.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/23748#discussion_r1969827032


More information about the hotspot-dev mailing list