RFR: 8345110: RISC-V: Optimize and and clean up byte reverse assembler routines

Fei Yang fyang at openjdk.org
Thu Nov 28 13:21:38 UTC 2024


On Thu, 28 Nov 2024 09:47:51 GMT, Hamlin Li <mli at openjdk.org> wrote:

> Thanks for cleanup! Not sure if I understand correctly, just have some questions, in upstream code at [1] [2], seems they both not expect a signed-extending?

Sorry, I should have explained that in the PR description. For these two use cases, we are are loading the 32-bit `npairs` of bytecode `lookupswitch` which are specified to be greater than or equal to 0 by the JVMS [1]. So there is no difference whether we use sign-extension or zero-extension. Hope that answers the question :-)

[1] https://docs.oracle.com/javase/specs/jvms/se7/html/jvms-6.html#jvms-6.5.lookupswitch

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

PR Comment: https://git.openjdk.org/jdk/pull/22410#issuecomment-2506110261


More information about the hotspot-dev mailing list