Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 80020
b: refs/heads/master
c: 992b959
h: refs/heads/master
v: v3
  • Loading branch information
Harvey Harrison authored and Ingo Molnar committed Jan 30, 2008
1 parent 23cb557 commit b60e05f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 17 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4ad02718345783a3b84bae1895917666b779850d
refs/heads/master: 992b95920a311db3267659ea17160e4812a05830
30 changes: 14 additions & 16 deletions trunk/include/asm-x86/local_64.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,32 +5,30 @@ static inline void local_inc(local_t *l)
{
__asm__ __volatile__(
"incq %0"
:"=m" (l->a.counter)
:"m" (l->a.counter));
:"+m" (l->a.counter));
}

static inline void local_dec(local_t *l)
{
__asm__ __volatile__(
"decq %0"
:"=m" (l->a.counter)
:"m" (l->a.counter));
:"+m" (l->a.counter));
}

static inline void local_add(long i, local_t *l)
{
__asm__ __volatile__(
"addq %1,%0"
:"=m" (l->a.counter)
:"ir" (i), "m" (l->a.counter));
:"+m" (l->a.counter)
:"ir" (i));
}

static inline void local_sub(long i, local_t *l)
{
__asm__ __volatile__(
"subq %1,%0"
:"=m" (l->a.counter)
:"ir" (i), "m" (l->a.counter));
:"+m" (l->a.counter)
:"ir" (i));
}

/**
Expand All @@ -48,8 +46,8 @@ static inline int local_sub_and_test(long i, local_t *l)

__asm__ __volatile__(
"subq %2,%0; sete %1"
:"=m" (l->a.counter), "=qm" (c)
:"ir" (i), "m" (l->a.counter) : "memory");
:"+m" (l->a.counter), "=qm" (c)
:"ir" (i) : "memory");
return c;
}

Expand All @@ -67,8 +65,8 @@ static inline int local_dec_and_test(local_t *l)

__asm__ __volatile__(
"decq %0; sete %1"
:"=m" (l->a.counter), "=qm" (c)
:"m" (l->a.counter) : "memory");
:"+m" (l->a.counter), "=qm" (c)
: : "memory");
return c != 0;
}

Expand All @@ -86,8 +84,8 @@ static inline int local_inc_and_test(local_t *l)

__asm__ __volatile__(
"incq %0; sete %1"
:"=m" (l->a.counter), "=qm" (c)
:"m" (l->a.counter) : "memory");
:"+m" (l->a.counter), "=qm" (c)
: : "memory");
return c != 0;
}

Expand All @@ -106,8 +104,8 @@ static inline int local_add_negative(long i, local_t *l)

__asm__ __volatile__(
"addq %2,%0; sets %1"
:"=m" (l->a.counter), "=qm" (c)
:"ir" (i), "m" (l->a.counter) : "memory");
:"+m" (l->a.counter), "=qm" (c)
:"ir" (i) : "memory");
return c;
}

Expand Down

0 comments on commit b60e05f

Please sign in to comment.