[PATCH 2/2] riscv: vectorised mem* and str* functions
Vineet Gupta
vineetg@rivosinc.com
Fri Feb 3 00:13:15 GMT 2023
On 2/1/23 11:03, Andrew Waterman wrote:
>> +#ifndef __riscv_strict_align
> strict-align is not the right thing to check here. As the RVA profile
> document explains, all RVA-compliant implementations must support
> misaligned loads and stores (so strict-align will be false), but they
> might execute extremely slowly (e.g., via trap and emulate), and so
> this approach will unduly penalize some implementations.
FWIW, the proposed __riscv_strict_align if generated can have 2 possible
values:
- 1 (explicit -mstrict-align used in build)
- 2 cpu tune param indicated unaligned access is slow (like with
trap-n-emulate)
So if theory code can still be written to cater to that.
-Vineet
More information about the Libc-alpha
mailing list