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
f610bbc6
Commit
f610bbc6
authored
Nov 16, 2007
by
David S. Miller
Committed by
David S. Miller
Feb 09, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SPARC]: Merge asm-sparc{,64}/byteorder.h
Signed-off-by:
David S. Miller
<
davem@davemloft.net
>
parent
145dea00
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
48 additions
and
53 deletions
+48
-53
include/asm-sparc/byteorder.h
include/asm-sparc/byteorder.h
+47
-4
include/asm-sparc64/byteorder.h
include/asm-sparc64/byteorder.h
+1
-49
No files found.
include/asm-sparc/byteorder.h
View file @
f610bbc6
/* $Id: byteorder.h,v 1.15 1997/12/16 19:20:44 davem Exp $ */
#ifndef _SPARC_BYTEORDER_H
#define _SPARC_BYTEORDER_H
#include <asm/types.h>
#include <asm/asi.h>
#ifdef __GNUC__
#ifdef CONFIG_SPARC32
#define __SWAB_64_THRU_32__
#endif
#ifdef CONFIG_SPARC64
static
inline
__u16
___arch__swab16p
(
const
__u16
*
addr
)
{
__u16
ret
;
__asm__
__volatile__
(
"lduha [%1] %2, %0"
:
"=r"
(
ret
)
:
"r"
(
addr
),
"i"
(
ASI_PL
));
return
ret
;
}
static
inline
__u32
___arch__swab32p
(
const
__u32
*
addr
)
{
__u32
ret
;
__asm__
__volatile__
(
"lduwa [%1] %2, %0"
:
"=r"
(
ret
)
:
"r"
(
addr
),
"i"
(
ASI_PL
));
return
ret
;
}
static
inline
__u64
___arch__swab64p
(
const
__u64
*
addr
)
{
__u64
ret
;
__asm__
__volatile__
(
"ldxa [%1] %2, %0"
:
"=r"
(
ret
)
:
"r"
(
addr
),
"i"
(
ASI_PL
));
return
ret
;
}
#define __arch__swab16p(x) ___arch__swab16p(x)
#define __arch__swab32p(x) ___arch__swab32p(x)
#define __arch__swab64p(x) ___arch__swab64p(x)
#endif
/* CONFIG_SPARC64 */
#define __BYTEORDER_HAS_U64__
#if defined(__GNUC__) && !defined(__STRICT_ANSI__) || defined(__KERNEL__)
# define __BYTEORDER_HAS_U64__
# define __SWAB_64_THRU_32__
#endif
#include <linux/byteorder/big_endian.h>
...
...
include/asm-sparc64/byteorder.h
View file @
f610bbc6
#ifndef _SPARC64_BYTEORDER_H
#define _SPARC64_BYTEORDER_H
#include <asm/types.h>
#include <asm/asi.h>
#ifdef __GNUC__
static
inline
__u16
___arch__swab16p
(
const
__u16
*
addr
)
{
__u16
ret
;
__asm__
__volatile__
(
"lduha [%1] %2, %0"
:
"=r"
(
ret
)
:
"r"
(
addr
),
"i"
(
ASI_PL
));
return
ret
;
}
static
inline
__u32
___arch__swab32p
(
const
__u32
*
addr
)
{
__u32
ret
;
__asm__
__volatile__
(
"lduwa [%1] %2, %0"
:
"=r"
(
ret
)
:
"r"
(
addr
),
"i"
(
ASI_PL
));
return
ret
;
}
static
inline
__u64
___arch__swab64p
(
const
__u64
*
addr
)
{
__u64
ret
;
__asm__
__volatile__
(
"ldxa [%1] %2, %0"
:
"=r"
(
ret
)
:
"r"
(
addr
),
"i"
(
ASI_PL
));
return
ret
;
}
#define __arch__swab16p(x) ___arch__swab16p(x)
#define __arch__swab32p(x) ___arch__swab32p(x)
#define __arch__swab64p(x) ___arch__swab64p(x)
#define __BYTEORDER_HAS_U64__
#endif
/* __GNUC__ */
#include <linux/byteorder/big_endian.h>
#endif
/* _SPARC64_BYTEORDER_H */
#include <asm-sparc/byteorder.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