Optimize andes_clear_page() and andes_copy_page() with prefetch
[linux-2.6/linux-mips.git] / include / asm-sparc64 / unaligned.h
blob9418756d52db600e03e263474deafc137da79bbb
1 #ifndef _ASM_SPARC64_UNALIGNED_H_
2 #define _ASM_SPARC64_UNALIGNED_H_
4 /* Sparc can't handle unaligned accesses. */
6 #include <linux/string.h>
9 /* Use memmove here, so gcc does not insert a __builtin_memcpy. */
11 #define get_unaligned(ptr) \
12 ({ __typeof__(*(ptr)) __tmp; memmove(&__tmp, (ptr), sizeof(*(ptr))); __tmp; })
14 #define put_unaligned(val, ptr) \
15 ({ __typeof__(*(ptr)) __tmp = (val); \
16 memmove((ptr), &__tmp, sizeof(*(ptr))); \
17 (void)0; })
19 #endif /* _ASM_SPARC64_UNALIGNED_H */