unaligned.h 696 B

123456789101112131415161718192021
  1. #ifndef __PPC64_UNALIGNED_H
  2. #define __PPC64_UNALIGNED_H
  3. /*
  4. * The PowerPC can do unaligned accesses itself in big endian mode.
  5. *
  6. * The strange macros are there to make sure these can't
  7. * be misused in a way that makes them not work on other
  8. * architectures where unaligned accesses aren't as simple.
  9. *
  10. * This program is free software; you can redistribute it and/or
  11. * modify it under the terms of the GNU General Public License
  12. * as published by the Free Software Foundation; either version
  13. * 2 of the License, or (at your option) any later version.
  14. */
  15. #define get_unaligned(ptr) (*(ptr))
  16. #define put_unaligned(val, ptr) ((void)( *(ptr) = (val) ))
  17. #endif /* __PPC64_UNALIGNED_H */