Commit e1f2113a authored by Johann's avatar Johann

Use __asm__ __volatile__ with gcc

Some version of clang refuse 'asm volatile'

Change-Id: I79d909ac8ae3c04b608f20c6f10fa79b7f9fc8e0
parent 07f9fa43
......@@ -27,7 +27,11 @@ static int bsr(int mask) {
#else
static int bsr(int mask) {
int eob;
#if defined(__GNUC__) && __GNUC__
__asm__ __volatile__("bsr %1, %0" : "=r" (eob) : "r" (mask) : "flags");
#elif defined(__SUNPRO_C) || defined(__SUNPRO_CC)
asm volatile("bsr %1, %0" : "=r" (eob) : "r" (mask) : "flags");
#endif
eob++;
if (mask == 0)
eob = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment