Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
9cfde202
Commit
9cfde202
authored
Feb 14, 2007
by
Ralf Baechle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[MIPS] Optimize get_unaligned / put_unaligned implementations.
Signed-off-by:
Ralf Baechle
<
ralf@linux-mips.org
>
parent
21a151d8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
6 deletions
+21
-6
include/asm-mips/unaligned.h
include/asm-mips/unaligned.h
+21
-6
No files found.
include/asm-mips/unaligned.h
View file @
9cfde202
...
...
@@ -3,12 +3,27 @@
* License. See the file "COPYING" in the main directory of this archive
* for more details.
*
* Copyright (C) 1996, 1999, 2000, 2001, 2003 by Ralf Baechle
* Copyright (C) 1999, 2000, 2001 Silicon Graphics, Inc.
* Copyright (C) 2007 Ralf Baechle (ralf@linux-mips.org)
*/
#ifndef _
ASM
_UNALIGNED_H
#define _
ASM
_UNALIGNED_H
#ifndef _
_ASM_GENERIC
_UNALIGNED_H
#define _
_ASM_GENERIC
_UNALIGNED_H
#include <
asm-generic/unaligned
.h>
#include <
linux/compiler
.h>
#endif
/* _ASM_UNALIGNED_H */
#define get_unaligned(ptr) \
({ \
struct __packed { \
typeof(*(ptr)) __v; \
} *__p = (void *) (ptr); \
__p->__v; \
})
#define put_unaligned(val, ptr) \
do { \
struct __packed { \
typeof(*(ptr)) __v; \
} *__p = (void *) (ptr); \
__p->__v = (val); \
} while(0)
#endif
/* __ASM_GENERIC_UNALIGNED_H */
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment