It should work for all architectures and all compilers, for values and arrays.
If unaligned access is supported, it has no overhead, otherwise proper assembly code (with underlying memcpy) is generated.
The big endian swap is removed as it is not the proper way to do it anyway. If we actually need to support big endianness, it should be done properly and for all types bigger than a single byte.
So, this one seems to be good finally...
It should work for all architectures and all compilers, for values and arrays.
If unaligned access is supported, it has no overhead, otherwise proper assembly code (with underlying memcpy) is generated. The big endian swap is removed as it is not the proper way to do it anyway. If we actually need to support big endianness, it should be done properly and for all types bigger than a single byte.
Needed by https://github.com/paparazzi/paparazzi/pull/2512