Skip to content

Commit

Permalink
bitopts: add a size sufix for ambiguous instructions
Browse files Browse the repository at this point in the history
clang requires that.

In file included from arch/x86/cpu.c:9:
arch/x86/include/asm/bitops.h:24:15: error: ambiguous instructions
require an explicit suffix (could be 'btsw', 'btsl', or 'btsq')
        asm volatile("bts %1,%0" : ADDR : "Ir" (nr) : "memory");

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
  • Loading branch information
avagin authored and xemul committed Apr 4, 2013
1 parent f238d56 commit f54f9f0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions arch/x86/include/asm/bitops.h
Expand Up @@ -21,12 +21,12 @@

static inline void set_bit(int nr, volatile unsigned long *addr)
{
asm volatile("bts %1,%0" : ADDR : "Ir" (nr) : "memory");
asm volatile("btsl %1,%0" : ADDR : "Ir" (nr) : "memory");
}

static inline void change_bit(int nr, volatile unsigned long *addr)
{
asm volatile("btc %1,%0" : ADDR : "Ir" (nr));
asm volatile("btcl %1,%0" : ADDR : "Ir" (nr));
}

static inline int test_bit(int nr, volatile const unsigned long *addr)
Expand All @@ -43,7 +43,7 @@ static inline int test_bit(int nr, volatile const unsigned long *addr)

static inline void clear_bit(int nr, volatile unsigned long *addr)
{
asm volatile("btr %1,%0" : ADDR : "Ir" (nr));
asm volatile("btrl %1,%0" : ADDR : "Ir" (nr));
}

/**
Expand Down

0 comments on commit f54f9f0

Please sign in to comment.