RFR: 8295968: RISC-V: Rename some assembler intrinsic functions for RVV 1.0 [v3]
Dingli Zhang
dzhang at openjdk.org
Wed Nov 2 12:23:28 UTC 2022
On Thu, 27 Oct 2022 10:24:15 GMT, Zixian Cai <zcai at openjdk.org> wrote:
>>> Not a reviewer. The changes match the spec. But perhaps it's a good idea to still keep the old names for compatibility per the spec. See line comments.
>>
>> Hi @caizixian, thanks for review!
>> In a compiler (e.g. llvm) these alias need to be preserved because the assembly file only has instruction names, but does it also need to be preserved in a virtual machine like openjdk?
>> If these older assembly mnemonics need to be retained as aliases, I think we can add it inside the macro assembler.
>
>> > Not a reviewer. The changes match the spec. But perhaps it's a good idea to still keep the old names for compatibility per the spec. See line comments.
>>
>> Hi @caizixian, thanks for review! In a compiler (e.g. llvm) these alias need to be preserved because the assembly file only has instruction names, but does it also need to be preserved in a virtual machine like openjdk? If these older assembly mnemonics need to be retained as aliases, I think we can add it inside the macro assembler.
>
> @DingliZhang Good question. I can think of some possible use cases.
>
> 1. Someone has a fork and has existing modifications that use the vector instructions. When they merge the upstream into their fork, even though there's no merge conflicts, the code won't compile. Though you can argue that if they have a fork and maintain non-trivial changes, they should probably stay up-to-date with upstream changes.
> 2. When we interact with the rest of the ecosystem, for example, binutils via hsdis, old mnemonics might still be shown by other tools, so keeping the old name might help when someone does a text search of the OpenJDK code.
> 3. Somewhat related to 2, when someone tries to port existing assembly snippets (either handwritten or disassembling object files produced by gcc or LLVM), it's easier if the old mnemonics still exist.
>
> Just to be clear, I don't have any strong opinion regarding this. But based on my recent experience with porting some GC assembly code to RISC-V, I thought it would be nice if we can make the assembler is bit more friendly to help people transition from older RISC-V specs to newer ones.
@caizixian @yadongw @RealFYang Thanks for the review!
-------------
PR: https://git.openjdk.org/jdk/pull/10878
More information about the hotspot-compiler-dev
mailing list