最近在用C30编译器的时候发现 编译器不能启动DSP引擎,必须要用到DSP库或者是内建函数,但是 __builtin_mac 这条函数编译出错,很困惑啊
代码如下:
void Calc_ProData(void)
{
u8 i,j;
signed int tmp = 1;
signed int xVal, yVal;
signed int *xm,*ym;
register int reg_a asm("A");
_IF = 1; //整形运算
i = ProAcBuf.pcnt-SIZE_POINTS;
j = MeaAcBuf.mcnt-SIZE_POINTS;
xm = &cos_tab[j];
ym = &ProAcBuf.UAB[i];
// reg_a = __builtin_clr();
reg_a = __builtin_lac(tmp,0);
reg_a = __builtin_movsac(&xm, &xVal, 2,&ym, &yVal, 2, 0,0);
#if 1
reg_a = __builtin_mac(reg_a, xVal, yVal,
&xm, &xVal, 2,
&ym, &yVal, 2, 0,0);
#endif
#if 0
reg_a = __builtin_mac(reg_a, xVal, yVal,
&xm, &xVal, 2,
&ym, &yVal, 2, 0,0);
reg_a = __builtin_mac(reg_a, xVal, yVal,
&xm, &xVal, 2,
&ym, &yVal, 2, 0,0);
reg_a = __builtin_mac(reg_a, xVal, yVal,
&xm, &xVal, 2,
&ym, &yVal, 2, 0,0);
#endif
// tmp = __builtin_sac(reg_a ,0);
}
cos_tab 在X空间 ProAcBuf 定义在Y空间
报错 error: Automatic generation of DSP instructions not yet supported; use __builtin_lac() instead
编译器版本 3.30 IDE 8.90
请帮忙看下 到底错在哪里了?非常感谢 |
|