1 #ifndef __ASM_SH64_UNALIGNED_H
2 #define __ASM_SH64_UNALIGNED_H
5 * This file is subject to the terms and conditions of the GNU General Public
6 * License. See the file "COPYING" in the main directory of this archive
9 * include/asm-sh64/unaligned.h
11 * Copyright (C) 2000, 2001 Paolo Alberelli
15 #include <linux/string.h>
18 /* Use memmove here, so gcc does not insert a __builtin_memcpy. */
20 #define get_unaligned(ptr) \
21 ({ __typeof__(*(ptr)) __tmp; memmove(&__tmp, (ptr), sizeof(*(ptr))); __tmp; })
23 #define put_unaligned(val, ptr) \
24 ({ __typeof__(*(ptr)) __tmp = (val); \
25 memmove((ptr), &__tmp, sizeof(*(ptr))); \
28 #endif /* __ASM_SH64_UNALIGNED_H */