RFR: 8340241: RISC-V: Returns mispredicted [v12]
Robbin Ehn
rehn at openjdk.org
Wed Oct 16 06:54:14 UTC 2024
On Wed, 16 Oct 2024 02:08:02 GMT, Fei Yang <fyang at openjdk.org> wrote:
>> I'm thinking about x18.
>
> So you want a RAS push action when you change to different register from `ra`. But seems to me that the original code with `ra` also achieves the same purpose from the spec. RAS push action is supposed to happen when rd=rs1=ra for `jalr`, which enables macro-op fusion of the sequence `auipc ra, imm20; jalr ra, imm12(ra)`. So I think we can simply revert this change. Anyway, this should be a slow case as you mentioned.
Yes, but I didn't want exceptions to the rules, as the asserts don't make sense without seing the RAS table.
I'll do some re-work and make the asserts according the table, but without the alternative calling convetion using x5. So using **ra** works and anyone can see why we can.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/21406#discussion_r1802463705
More information about the hotspot-dev
mailing list