|
|
| File: [Development] / linux-2.6-xfs / include / asm-h8300 / Attic / unaligned.h (download)
Revision 1.2, Fri Oct 13 17:03:09 2006 UTC (11 years ago) by tes.longdrop.melbourne.sgi.com
Merge up to 2.6.18 Merge of 2.6.x-xfs-melb:linux:27192b by kenmcd. |
#ifndef __H8300_UNALIGNED_H
#define __H8300_UNALIGNED_H
/* Use memmove here, so gcc does not insert a __builtin_memcpy. */
#define get_unaligned(ptr) \
({ __typeof__(*(ptr)) __tmp; memmove(&__tmp, (ptr), sizeof(*(ptr))); __tmp; })
#define put_unaligned(val, ptr) \
({ __typeof__(*(ptr)) __tmp = (val); \
memmove((ptr), &__tmp, sizeof(*(ptr))); \
(void)0; })
#endif