RFR: 8340241: RISC-V: Returns mispredicted [v12]
Fei Yang
fyang at openjdk.org
Wed Oct 16 02:10:14 UTC 2024
On Tue, 15 Oct 2024 18:17:47 GMT, Robbin Ehn <rehn at openjdk.org> wrote:
>> Also note that this should be slow case, so here we can actually use **ra** as we are probably about to unwind the stack, which means all predictions will be wrong.
>
> 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, which enable 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.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/21406#discussion_r1802232487
More information about the hotspot-dev
mailing list