URL
https://opencores.org/ocsvn/or1k/or1k/trunk
Subversion Repositories or1k
[/] [or1k/] [trunk/] [linux/] [linux-2.4/] [include/] [asm-sh64/] [unaligned.h] - Rev 1774
Go to most recent revision | Compare with Previous | Blame | View Log
#ifndef __ASM_SH64_UNALIGNED_H #define __ASM_SH64_UNALIGNED_H /* * This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive * for more details. * * include/asm-sh64/unaligned.h * * Copyright (C) 2000, 2001 Paolo Alberelli * * SH can't handle unaligned accesses. * */ #include <linux/string.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 /* __ASM_SH64_UNALIGNED_H */
Go to most recent revision | Compare with Previous | Blame | View Log