Walrus Interp uses reinterpret_cast for data movement in load and store instructions. On ARM32, if the size of the data to be moved is 8 bytes, then compiler generates LDRD and STRD instructions. Address for these instructions has to be word-aligned, whilst Walrus has to support non-aligned data movement.
To achieve this, Walrus now uses memcpyEndianAware function for moving 8 byte-long data (int64, uint64 and double) in Interp on ARM32. This function generates two LDR and two STR instructions that can cope with non-aligned addresses.
Moreover, memory.wast test has been improved in order to check unaligned memory access.
Unfortunately Qemu-arm doesn't care about memory alignment, therefor it won't cause BUS ERROR (but it does occure on arm hardware).
Walrus Interp uses reinterpret_cast for data movement in load and store instructions. On ARM32, if the size of the data to be moved is 8 bytes, then compiler generates LDRD and STRD instructions. Address for these instructions has to be word-aligned, whilst Walrus has to support non-aligned data movement.
To achieve this, Walrus now uses memcpyEndianAware function for moving 8 byte-long data (int64, uint64 and double) in Interp on ARM32. This function generates two LDR and two STR instructions that can cope with non-aligned addresses.
Moreover, memory.wast test has been improved in order to check unaligned memory access.
Unfortunately Qemu-arm doesn't care about memory alignment, therefor it won't cause BUS ERROR (but it does occure on arm hardware).