You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The RISC-V chunkset code includes the line uint##elen##_t val = *(uint##elen##_t*)from; as part of the CHUNK_MEMSET_RVV_IMPL, however all the other chunkset implementations use alignment-safe reads here. RISC-V also doesn't define UNALIGNED_OK, and looking at the output from Compiler Explorer shows that both memcpy and __attribute__ ((__packed__, __may_alias__)) read one byte at a time for smaller sizes. Is using unaligned reads intentional here?
The text was updated successfully, but these errors were encountered:
AFAIK RISC-V traps on unaligned loads and stores, but can handle them in M-mode. In case of reads, it will read more and shift the result to get the correct bytes. In case of unaligned writes, it will write byte by byte.
The RISC-V chunkset code includes the line
uint##elen##_t val = *(uint##elen##_t*)from;
as part of theCHUNK_MEMSET_RVV_IMPL
, however all the other chunkset implementations use alignment-safe reads here. RISC-V also doesn't defineUNALIGNED_OK
, and looking at the output from Compiler Explorer shows that both memcpy and__attribute__ ((__packed__, __may_alias__))
read one byte at a time for smaller sizes. Is using unaligned reads intentional here?The text was updated successfully, but these errors were encountered: