On 06/04/2016 05:53 PM, Patrick Baggett wrote: > Yeah, the memcpy with a word will probably be wrong due to endian issues when > it is stored because dst[3] would be written in the first byte, but they are > assuming that dst[3] is the last byte, given that they do OR with 0xff << 24, > i.e. filling dst[3] = 0xff.
That was actually my concern as well, thanks for reaffirming this. > Bonus points if you find a way to do this with VIS intrinsics! ;) Sounds fancy but I'd always prefer portable and robust code in these situations. I wonder whether it's actually such a time-critical section that using the byte-wise assignments would make the code much slower. Adrian -- .''`. John Paul Adrian Glaubitz : :' : Debian Developer - glaub...@debian.org `. `' Freie Universitaet Berlin - glaub...@physik.fu-berlin.de `- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913