RFR: 8348561: Add aarch64 intrinsics for ML-DSA [v5]

Andrew Haley aph at openjdk.org
Tue Feb 25 13:52:55 UTC 2025


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

>>> I have not found the place in the manual where it allows/encourages the use of x instead of w, but I admit I > haven't read through all of the 14568 pages.
>> 
>> Yes, you've got a point, but it's always worked. Is this a macos thing, maybe?
>> 
>>> So I'm stuck for now. What 'as' are you using?
>> 
>> Latest binutils, today. I checked it out half an hour ago.
>> 
>> GNU assembler (GNU Binutils) 2.44.50.20250225
>> Copyright (C) 2025 Free Software Foundation, Inc.
>> 
>> Try this:
>> 
>> 
>> diff --git a/test/hotspot/gtest/aarch64/aarch64-asmtest.py b/test/hotspot/gtest/aarch64/aarch64-asmtest.py
>> index 9c770632e25..b1674fff04d 100644
>> --- a/test/hotspot/gtest/aarch64/aarch64-asmtest.py
>> +++ b/test/hotspot/gtest/aarch64/aarch64-asmtest.py
>> @@ -476,8 +476,13 @@ class AddSubExtendedOp(ThreeRegInstruction):
>>                     + ", " + str(self.amount) + ");"))
>>  
>>      def astr(self):
>> -        return (super(AddSubExtendedOp, self).astr()
>> -                + (", " + AddSubExtendedOp.optNames[self.option]
>> +        prefix = self.asmRegPrefix
>> +        return (super(ThreeRegInstruction, self).astr()
>> +                + ('%s, %s, %s'
>> +                   % (self.reg[0].astr(prefix),
>> +                      self.reg[1].astr(prefix),
>> +                      self.reg[1].astr("w"))
>> +                + ", " + AddSubExtendedOp.optNames[self.option]
>>                     + " #" + str(self.amount)))
>>  
>>  class AddSubImmOp(TwoRegImmedInstruction):
>
> I just tried it with top-of trunk latest binutils:
> 
> fedora:aarch64 $ ~/binutils-gdb-install/bin/as -march=armv9-a+sha3+sve2-bitperm aarch64ops.s
> fedora:aarch64 $ ~/binutils-gdb-install/bin/as --version
> GNU assembler (GNU Binutils) 2.44.50.20250225

Aha!


aph at Andrews-MacBook-Pro ~ % as t.s   
t.s:1:19: error: expected 'sxtx' 'uxtx' or 'lsl' with optional integer in range [0, 4]
sub x1, x10, x23, sxth #2
                  ^
aph at Andrews-MacBook-Pro ~ % as --version
Apple clang version 16.0.0 (clang-1600.0.26.6)
Target: arm64-apple-darwin24.3.0

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

PR Review Comment: https://git.openjdk.org/jdk/pull/23300#discussion_r1969823700


More information about the hotspot-dev mailing list