mbox series

[RFC,0/1] target/riscv: use tcg ops generation to emulate whole reg rvv loads/stores.

Message ID 20241218170840.1090473-1-paolo.savini@embecosm.com (mailing list archive)
Headers show
Series target/riscv: use tcg ops generation to emulate whole reg rvv loads/stores. | expand

Message

Paolo Savini Dec. 18, 2024, 5:08 p.m. UTC
The following patch aims at speeding up the emulation of whole register loads/stores by generating tcg operations rather then going through the call of a helper function.
The proposed implementation aims at using atomic 16 byte loads and store when possible and it updates the value of vstart in order to keep the state of the cpu consistent.
This kind of precaution doesn't seem to be followed by other vector operations that use tcg ops generation so this might be redundant.
Also the atomicity requirements of qemu loads and stores get removed if we are running in serial mode (!CF_PARALLEL).
In light of this I wonder whether exceptions could be a concern or not in the context of tcg ops generation, above all when it comes to updating the state of the cpu consistently (vstart).
Any feedback welcome.

The proposed implementation aims at replacing the correspondent helper function, that will be removed in the final version of the patch, unless there are corner cases where it is still necessary to use it. 

Cc: Richard Handerson <richard.henderson@linaro.org>
Cc: Palmer Dabbelt <palmer@dabbelt.com>
Cc: Alistair Francis <alistair.francis@wdc.com>
Cc: Bin Meng <bmeng.cn@gmail.com>
Cc: Weiwei Li <liwei1518@gmail.com>
Cc: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Cc: Liu Zhiwei <zhiwei_liu@linux.alibaba.com>
Cc: Helene Chelin <helene.chelin@embecosm.com>
Cc: Nathan Egge <negge@google.com>
Cc: Max Chou <max.chou@sifive.com>
Cc: Jeremy Bennett <jeremy.bennett@embecosm.com>
Cc: Craig Blackmore <craig.blackmore@embecosm.com>

Paolo Savini (1):
  target/riscv: use tcg ops generation to emulate whole reg rvv
    loads/stores.

 target/riscv/insn_trans/trans_rvv.c.inc | 104 +++++++++++++-----------
 1 file changed, 56 insertions(+), 48 deletions(-)