RFR: 8320697: RISC-V: Small refactoring for runtime calls
Robbin Ehn
rehn at openjdk.org
Wed Nov 29 07:57:06 UTC 2023
On Tue, 28 Nov 2023 16:09:11 GMT, Andrew Haley <aph at openjdk.org> wrote:
> > I think there is an underlying issue with the whole design with masm/asm. As there is no clear separation between "I want this to happen" and "I want to emit this instruction". I think methods which have identical name as an instruction should indicate "I want to emit this instruction".
>
> I can see the logic behind that, but certain CPU designers write things like "A "programmer-friendly" assembler may accept a negative immediate between -(2^24 -1) and -1 inclusive, causing it to convert a requested ADD operation to a SUB, or vice versa, and then encode the absolute value of the immediate as for uimm24." So I think maybe that bird has already flown...
Yes. I think this case is extra confusing as you ask for one instruction for a materializing a pc relative value.
But you can get several instruction loading an absolute value.
If this is okey, the programmer never want a pc relative value, he just wanted that value.
Therefore I think using the name auipc is a bit sub-optimal to tell this story.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/16816#issuecomment-1831386525
More information about the hotspot-compiler-dev
mailing list