Сейчас нашел на сайте ADI описание этой проблемы:
Цитата
Using "n" asm constraint results in compiler error
Prognosis: Fixed in Update 5.0 Base Release
Using the "n" constraint in an inline asm results in a compiler error when compiling with the Blackfin VDSP++ compiler.
The effect of the constraint should be to define a literal as an asm statement operand.
The same effect can be achieved by using the literal directly in the asm statement template.
So for example:
asm("// %0 " : : "n"(256) : ); // fails to compile
could be replaced by the following to workaround the problem:
asm("// 256 " : : : );
Т.е. проблема вроде решена в VDSP 5.0. Я не шарю в ассемблере для BF, может кто-нибудь более опытный скажет, как например переписать следущий листинг:
Код
__asm__ (
"P0 = 15;\n\t"
"R0 = %1;\n\t"
"R1 = %2;\n\t"
//"R0 = R0 + R1;\n\t"
"R0 <<= 1;\n\t"
"DIVS (R0, R1);\n\t"
"LOOP divide%= LC0 = P0;\n\t"
"LOOP_BEGIN divide%=;\n\t"
"DIVQ (R0, R1);\n\t"
"LOOP_END divide%=;\n\t"
"R0 = R0.L;\n\t"
"%0 = R0;\n\t"
: "=m" (res)
: "m" (a), "m" (bb)
: "P0", "R0", "R1", "cc");
VDSP ругается здесь на строчку : "=m" (res)