RFR: 8339741: RISC-V: C ABI breakage for integer on stack [v2]

Fei Yang fyang at openjdk.org
Tue Sep 10 07:49:04 UTC 2024


On Tue, 10 Sep 2024 07:44:05 GMT, Fei Yang <fyang at openjdk.org> wrote:

> Oh, so I have question here:
> 
> ```
>   } else if (dst.first()->is_stack()) {
>     // reg to stack
>     sd(src.first()->as_Register(), Address(sp, reg2offset_out(dst.first())));
>   } else {
>     if (dst.first() != src.first()) {
>       sign_extend(dst.first()->as_Register(), src.first()->as_Register(), 32);
>     }
>   }
> ```
> 
> The sd is done without any sign extension, hence we must have C ABI representation in the register. But that means the register to register case, where we have sign_extend(), is actually just a move. AFAIK this is the case, which I hope, otherwise we have third bug here. So I think we should use `mv` to be clear about what we are doing.
> 
> ?

Yes. Thanks for the update!

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

PR Comment: https://git.openjdk.org/jdk/pull/20912#issuecomment-2339913882


More information about the hotspot-dev mailing list