Please sign in to comment.
string.c: make it 64-bit compatible
Casting a pointer to an int produces warnings with 64-bit targets. Furthermore, an int is not always the optimal memory element that can be copied in that case. Let's use uintptr_t to cast pointers to integers for alignment determination purposes, and mem_word_t to denote the optimal memory "word" that can be copied on the platform. The mem_word_t definition is equivalent to uintptr_t by default. However, some 32-bit targets such as ARM platforms with the LDRD/STRD instructions could benefit from word_t being an uint64_t. Signed-off-by: Nicolas Pitre <firstname.lastname@example.org>
- Loading branch information...
Showing with 31 additions and 11 deletions.