发新话题
打印

[分享] 说说VDSP5

本主题由 soso 于 2008-8-25 11:15 审核通过

说说VDSP5

前段时间,将uclinux内核移植到了Visual DSP 5.0下,也就来说说对Vdsp5的一些看法。
总的说,VDSP5还是一个比较不错的IDE的,面对23M的dxe文件,都能正确地进行调试,虽然其下载速度变慢,大概要4分钟左右才可以下载完。
对VDSP的意见集中在下面几个方面:
1、不支持空行。
比如仅仅在一行上打上一个分号,VDSP就会有强烈的意见。这一点可能不应该把帐算在VDSP的头上,但是我相信只要对编译器进行很小的改动就可以实现,这对于将软件从GCC编译器移植到VDSP却有莫大的好处。
2、.macro
在gcc下的汇编支持.macro,它类似于define,但是使用.macro可以在定义中使用#ifdef这样的条件编译,而用define则不行,希望未来VDSP也可以支持它。
3、.rept
使用.rept,相当于可以对代码进行copy / paste的操作,可以节省很多时间,希望未来VDSP也可以支持。
4、jump 1f
可恨,这么好的一个东西,VDSP居然不支持。
5、嵌入汇编
这是VDSP最烂的一个地方,如果你在C中嵌入汇编,而这个代码又很不幸地出错了,那你别指望VDSP会帮助你,它的错误提示完全让人不知所云!!

关于C编译器,主要存在两个BUG,都和优化有关。
1、__builtin_expect
这个本来是个好东西,可惜有时它会引起编译器的崩溃,而且其提示让人不知所云!
2、inline
这个也是个好东西,但当内联超过多层的时候(不确定是否这个原因),也会引起编译器的崩溃!就像这样的:
..\..\mm\filemap.c
At end of source: : internal error: Uncaught exception Assertion failed raised
          at ../../../bril/optimiser/dominators.c:910 (in pass
          cleanup_scalar_stores_nonopt during compilation of
          _find_or_create_page). Please submit a bug report with this message,
          the command line used, type of machine and the output of the
          compiler when you add -ED -v to the command line. Please also send
          us the pre-processed file that is generated by the -ED option (the
          file generated is named <original_filename>.i)

1 catastrophic error detected in the compilation of "..\..\mm\filemap.c".
Compilation aborted.
cc3089: fatal error: Compilation failed
请修改签名 ^_^
发新话题