RFR: 8340241: RISC-V: Returns mispredicted [v12]

Robbin Ehn rehn at openjdk.org
Wed Oct 16 09:06:31 UTC 2024


On Wed, 16 Oct 2024 06:51:37 GMT, Robbin Ehn <rehn at openjdk.org> wrote:

>> 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.

I made an update. Let me know.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/21406#discussion_r1802668529


More information about the hotspot-dev mailing list