[riscv-port] RFR: 8278337: riscv: remove unnecessary ld/sd zr around calls

Feilong Jiang fjiang at openjdk.java.net
Tue Dec 7 12:48:31 UTC 2021


On Tue, 7 Dec 2021 11:21:00 GMT, kuaiwei <duke at openjdk.java.net> wrote:

> It seems zr(x0) is used as stack alignment when saving/restoring registers around calls. But it's unnecessary to ld/st x0 from/to stack. We just need reserve a stack slot in case alignment is required.

Changes requested by fjiang (Author).

src/hotspot/cpu/riscv/riscv.ad line 1188:

> 1186:     return 12 * NativeInstruction::instruction_size;
> 1187:   }
> 1188: }

`// for real runtime callouts it will be six instructions` should be five instructions now

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

PR: https://git.openjdk.java.net/riscv-port/pull/25


More information about the riscv-port-dev mailing list