Re: cmpxchg.h:245:2: error: ʽasmʼ operand has impossible constraints

From: Thomas Gleixner
Date: Fri Aug 31 2018 - 16:01:45 EST


On Mon, 27 Aug 2018, Meelis Roos wrote:

> While trying to compile v4.18-13105-gaba16dc5cf93 with gcc 5.3.1 on a
> 32-bit x86 configured for AMD K6:

I tried to get hold of that debian gcc 5.3.1 compiler, but no luck so far.

> CC mm/slub.o
> In file included from ./arch/x86/include/asm/atomic.h:8:0,
> from ./include/linux/atomic.h:7,
> from ./arch/x86/include/asm/thread_info.h:54,
> from ./include/linux/thread_info.h:38,
> from ./arch/x86/include/asm/preempt.h:7,
> from ./include/linux/preempt.h:81,
> from ./include/linux/spinlock.h:51,
> from ./include/linux/mmzone.h:8,
> from ./include/linux/gfp.h:6,
> from ./include/linux/mm.h:10,
> from mm/slub.c:13:
> mm/slub.c: In function ʽ__slab_freeʼ:
> ./arch/x86/include/asm/cmpxchg.h:245:2: error: ʽasmʼ operand has impossible constraints
> asm volatile(pfx "cmpxchg%c4b %2; sete %0" \

I so love the informative output of GCC on ASM errors ....

What's even more confusing is that the __cmpxchg_double() macro has not
been changed since Jan, 2012.

Thanks,

tglx