~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

Linux Cross Reference
Linux/include/asm-sh/unaligned.h

Version: ~ [ 2.4.0 ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 #ifndef __ASM_SH_UNALIGNED_H
  2 #define __ASM_SH_UNALIGNED_H
  3 
  4 /* SH can't handle unaligned accesses. */
  5 
  6 #include <linux/string.h>
  7 
  8 
  9 /* Use memmove here, so gcc does not insert a __builtin_memcpy. */
 10 
 11 #define get_unaligned(ptr) \
 12   ({ __typeof__(*(ptr)) __tmp; memmove(&__tmp, (ptr), sizeof(*(ptr))); __tmp; })
 13 
 14 #define put_unaligned(val, ptr)                         \
 15   ({ __typeof__(*(ptr)) __tmp = (val);                  \
 16      memmove((ptr), &__tmp, sizeof(*(ptr)));            \
 17      (void)0; })
 18 
 19 #endif /* __ASM_SH_UNALIGNED_H */
 20 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

This page was automatically generated by the LXR engine.
Visit the LXR main site for more information.