You have cy
and _c[0]
as an input/output variable in both cases. You have properly specified them as both output and input with a matching constraint. This may be PPC specific as in that "1"
has an ambiguous meaning in extended asm (register number), I myself only work on x86.
You can get rid of the warning (and any bugs that may be associated with it) by specifying your variable as an input/output variable just once using the "+"
output quantifier instead of "="
:
#define INNERMUL asm( \
" mullw 16,%2,%3 \n\t" \
" mulhwu 17,%2,%3 \n\t" \
" addc 16,16,%0 \n\t" \
" addze 17,17 \n\t" \
" lwz 18,%1 \n\t" \
" addc 16,16,18 \n\t" \
" addze %0,17 \n\t" \
" stw 16,%1 \n\t" \
:"+r"(cy) \
,"+m"(_c[0]) \
:"r"(mu) \
,"r"(tmpm[0]) \
:"16", "17", "18","cc"); ++tmpm;
#define PROPCARRY \
asm( \
" lwz 16,%1 \n\t" \
" addc 16,16,%0 \n\t" \
" stw 16,%1 \n\t" \
" xor %0,%0,%0 \n\t" \
" addze %0,%0 \n\t" \
:"+r"(cy) \
,"+m"(_c[0]) \
: \
:"16","cc");
Edit: from the gcc extended asm manual:
Extended asm supports input-output or read-write operands. Use the constraint character ‘+’ to indicate such an operand and list it with the output operands.
Also I am not sure wether "%cc"
is a valid clobber identifier, normally you don't prefix those with "%"
. On x86 the appropriate identifier is "cc"
.