URL
https://opencores.org/ocsvn/or1k_old/or1k_old/trunk
Subversion Repositories or1k_old
[/] [or1k_old/] [trunk/] [uclinux/] [uClinux-2.0.x/] [include/] [asm-or32/] [unaligned.h] - Rev 1782
Compare with Previous | Blame | View Log
#ifndef __OR32_UNALIGNED_H #define __OR32_UNALIGNED_H #define get_unaligned(ptr) ({ \ typeof((*(ptr))) x; \ memcpy(&x, (void*)ptr, sizeof(*(ptr))); \ x; \ }) #define put_unaligned(val, ptr) ({ \ typeof((*(ptr))) x = val; \ memcpy((void*)ptr, &x, sizeof(*(ptr))); \ }) #endif