OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [linux/] [linux-2.4/] [include/] [asm-parisc/] [unaligned.h] - Blame information for rev 1774

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1275 phoenix
#ifndef _ASM_PARISC_UNALIGNED_H_
2
#define _ASM_PARISC_UNALIGNED_H_
3
 
4
/* parisc can't handle unaligned accesses. */
5
/* copied from asm-sparc/unaligned.h */
6
 
7
#include <linux/string.h>
8
 
9
 
10
/* Use memmove here, so gcc does not insert a __builtin_memcpy. */
11
 
12
#define get_unaligned(ptr) \
13
  ({ __typeof__(*(ptr)) __tmp; memmove(&__tmp, (ptr), sizeof(*(ptr))); __tmp; })
14
 
15
#define put_unaligned(val, ptr)                         \
16
  ({ __typeof__(*(ptr)) __tmp = (val);                  \
17
     memmove((ptr), &__tmp, sizeof(*(ptr)));            \
18
     (void)0; })
19
 
20
 
21
#ifdef __KERNEL__
22
struct pt_regs;
23
void handle_unaligned(struct pt_regs *regs);
24
int check_unaligned(struct pt_regs *regs);
25
#endif
26
 
27
#endif /* _ASM_PARISC_UNALIGNED_H_ */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.