[llvmlinux] Compile ASM warning: "conditional infixes are deprecated in unified syntax"
Behan Webster
behanw at converseincode.com
Fri Nov 23 01:13:21 UTC 2012
I've made some progress on this issue. It was bugging me, so I decided
to hunt a bit. :)
I wrote a shim script to grab the gas warnings, and a copy of the
generated .s file so I could see what was happening.
It's definitely a warning from the GNU assemble (gas). It's inline
assembly code included from an ARM Linux macro in
arch/arm/include/asm/uaccess.h
/* We use 33-bit arithmetic here... */
#define __range_ok(addr,size) ({ \
unsigned long flag, roksum; \
__chk_user_ptr(addr); \
__asm__("adds %1, %2, %3; sbcccs %1, %1, %0; movcc %0, #0" \
: "=&r" (flag), "=&r" (roksum) \
: "r" (addr), "Ir" (size), "0"
(current_thread_info()->addr_limit) \
: "cc"); \
flag; })
This ends up with Clang inserting something like the following into it's
own ASM code which then is jammed through gas, which complains (the
following is an example from compiling kernel/futex.c)
adds r5, r1, #4; sbcccs r5, r5, r4; movcc r4, #0
This is a problem with the above Linux inline ASM code, not with Clang,
nor with gas. It appears the new "Unified syntax" for ARM ASM code now
used by gas doesn't allow the use of conditional infixes anymore (the CC
part).
I think it is either the "sbcccs" or "movcc" which is triggering the
deprecated warning.
This is what I've found from the ARM documentation.
SBC -instr-> Multiword subtract
CC -infix-> C Clear, Lower (unsigned <)
S -suffix-> the condition code flags are updated on the
result of the operation
MOV -instr-> Move instruction
CC -infix-> C Clear, Lower (unsigned <)
I'm not yet sure how this can be fixed. I was hoping somebody on the
list might have a better idea than I do right now.
Behan
--
Behan Webster
behanw at converseincode.com
More information about the LLVMLinux
mailing list