Regardig asm volatile query
Segher Boessenkool
segher@kernel.crashing.org
Thu Jul 29 23:41:00 GMT 2010
> asm volatile (
> "\n\t"
> :
> : "r" (pu8In4), "r" (s32PosInt), "r" (s16CoeffOrg), "r" (u32PosFrac),
> "r" (u8Out), "r" (u32Step), "r" (u32TgtWidth)
> : "r2", "r3", "r4", "r5", "r6", "r7", "r8
> );
You have 7 inputs and 7 clobbers. Assuming this is ARM or some other
arch with about 16 regs, this is very much pushing the boundaries of
the possible.
> reg_org.c:12: error: can't find a register in class 'GENERAL_REGS'
> while reloading 'asm'
> reg_org.c:12: error: 'asm' operand has impossible constraints
>
> I Want to know
> 1-> why compilation is happening with gcc-4.2 toolchian not with
> gcc-4.3
You got lucky with 4.2, and you don't with 4.3 .
> 2-> what is the difference between gcc-4.2 and gcc4.3 related to
> asm volatile
Nothing really. The compiler sometimes needs a few registers to do
other
things, but you used up all of them.
Segher
More information about the Gcc-help
mailing list