Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace pointer casting with memcpy to avoid unaligned access, and ad…
…d endian support. Some systems which as AVR32 requires variables greater than 8bit to be aligned to 16 bit boundaries. If you cast a memory location which is not on an even 16 bit address to a pointer-to-integer, accessing that variable will cause invalid memory access. When it comes to the endian, only a select few platforms are affected. Performance wise the compiler is pretty good at detecting what's going on and will replace the shift operations with one instruction if available.
- Loading branch information