On Mon, 24 Feb 2025 17:11:24 GMT, Andrew Dinn <ad...@openjdk.org> wrote:

>> I have tried that, but the python script (actually the as command that it 
>> started) threw error messages:
>> 
>> aarch64ops.s:338:24: error: index must be a multiple of 8 in range [0, 
>> 32760].
>>         prfm    PLDL1KEEP, [x15, 43]
>>                                  ^
>> aarch64ops.s:357:20: error: expected 'sxtx' 'uxtx' or 'lsl' with optional 
>> integer in range [0, 4]
>>         sub     x1, x10, x23, sxth #2
>>                               ^
>> aarch64ops.s:359:20: error: expected 'sxtx' 'uxtx' or 'lsl' with optional 
>> integer in range [0, 4]
>>         add     x11, x21, x5, uxtb #3
>>                               ^
>> aarch64ops.s:360:22: error: expected 'sxtx' 'uxtx' or 'lsl' with optional 
>> integer in range [0, 4]
>>         adds    x11, x17, x17, uxtw #1
>>                                ^
>> aarch64ops.s:361:20: error: expected 'sxtx' 'uxtx' or 'lsl' with optional 
>> integer in range [0, 4]
>>         sub     x11, x0, x15, uxtb #1
>>                               ^
>> aarch64ops.s:362:19: error: expected 'sxtx' 'uxtx' or 'lsl' with optional 
>> integer in range [0, 4]
>>         subs    x7, x1, x0, sxth #2
>>                             ^
>> This is without any modifications from what is in the master branch 
>> currently.
>
> @ferakocz This also really needs addressing before committing the patch. 
> Perhaps @theRealAph can advise on how to circumvent the problems you found 
> when trying to update the python script?

> You might have to use an assembler from the latest binutils build (if the 
> system default isn't the latest) and add the path to the assembler in the 
> "AS" variable. Also you can run it something like - `python 
> aarch64-asmtest.py | expand > asmtest.out.h`. Please let me know if you still 
> face problems.

People have been running this script for a decade now.

Let's look at just one of these:


aarch64ops.s:357:20: error: expected 'sxtx' 'uxtx' or 'lsl' with optional 
integer in range [0, 4]
sub x1, x10, x23, sxth #2


>From the AArch64 manual:

SUB (extended register)
SUB <Xd|SP>, <Xn|SP>, <R><m>{, <extend> {#<amount>}}

 It thinks this is a SUB (shifted register), bit it's really a SUB (extended 
register).


fedora:aarch64 $ cat t.s
sub x1, x10, x23, sxth #2
fedora:aarch64 $ as t.s
fedora:aarch64 $ objdump -D a.out
Disassembly of section .text:

0000000000000000 <.text>:
   0:   cb37a941        sub     x1, x10, w23, sxth #2


So perhaps binutils expects w23 here, not x23. But the manual (ARM DDI 0487K.a) 
says x23 should be just fine, and, what's more, gives the x form preferred 
status.

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

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

Reply via email to