projects
/
powerpc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[PATCH] bitops: x86_64: use generic bitops
[powerpc.git]
/
include
/
asm-x86_64
/
local.h
diff --git
a/include/asm-x86_64/local.h
b/include/asm-x86_64/local.h
index
3e72c41
..
bf14803
100644
(file)
--- a/
include/asm-x86_64/local.h
+++ b/
include/asm-x86_64/local.h
@@
-5,7
+5,7
@@
typedef struct
{
typedef struct
{
- volatile unsigned
int
counter;
+ volatile unsigned
long
counter;
} local_t;
#define LOCAL_INIT(i) { (i) }
} local_t;
#define LOCAL_INIT(i) { (i) }
@@
-16,7
+16,7
@@
typedef struct
static __inline__ void local_inc(local_t *v)
{
__asm__ __volatile__(
static __inline__ void local_inc(local_t *v)
{
__asm__ __volatile__(
- "inc
l
%0"
+ "inc
q
%0"
:"=m" (v->counter)
:"m" (v->counter));
}
:"=m" (v->counter)
:"m" (v->counter));
}
@@
-24,7
+24,7
@@
static __inline__ void local_inc(local_t *v)
static __inline__ void local_dec(local_t *v)
{
__asm__ __volatile__(
static __inline__ void local_dec(local_t *v)
{
__asm__ __volatile__(
- "dec
l
%0"
+ "dec
q
%0"
:"=m" (v->counter)
:"m" (v->counter));
}
:"=m" (v->counter)
:"m" (v->counter));
}
@@
-32,7
+32,7
@@
static __inline__ void local_dec(local_t *v)
static __inline__ void local_add(unsigned int i, local_t *v)
{
__asm__ __volatile__(
static __inline__ void local_add(unsigned int i, local_t *v)
{
__asm__ __volatile__(
- "add
l
%1,%0"
+ "add
q
%1,%0"
:"=m" (v->counter)
:"ir" (i), "m" (v->counter));
}
:"=m" (v->counter)
:"ir" (i), "m" (v->counter));
}
@@
-40,7
+40,7
@@
static __inline__ void local_add(unsigned int i, local_t *v)
static __inline__ void local_sub(unsigned int i, local_t *v)
{
__asm__ __volatile__(
static __inline__ void local_sub(unsigned int i, local_t *v)
{
__asm__ __volatile__(
- "sub
l
%1,%0"
+ "sub
q
%1,%0"
:"=m" (v->counter)
:"ir" (i), "m" (v->counter));
}
:"=m" (v->counter)
:"ir" (i), "m" (v->counter));
}