Skip to content

Commit

Permalink
target/riscv: add endianness check when optimizing small vector loads…
Browse files Browse the repository at this point in the history
… and stores.

This patch adds a condition on the endianness of the host for the emulation
of vector loads and store to be done with an optimized loop.
We add this because such optimization doesn't work for big endian hosts.

Signed-off-by: Paolo Savini <[email protected]>
  • Loading branch information
PaoloS02 committed Nov 11, 2024
1 parent 45db865 commit 503712d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion target/riscv/vector_helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ vext_ldst_us(void *vd, target_ulong base, CPURISCVState *env, uint32_t desc,
return;
}

#ifdef CONFIG_USER_ONLY
#if defined(CONFIG_USER_ONLY) && !HOST_BIG_ENDIAN
/* For data sizes <= 64 bits and for LMUL=1 with VLEN=128 bits we get a
* better performance by doing a simple simulation of the load/store
* without the overhead of prodding the host RAM */
Expand Down

0 comments on commit 503712d

Please sign in to comment.