2016-11-28 300 views
0

我发现了几个代码片断,用于禁用专用代码部分的GCC优化。greenhills编译器关闭优化文件或部分

与编译GCC优化(0)

但我无法找到类似的东西为Greenhils编译器。

有没有这样的选择?

+0

你有没有问GHS支持? – Tim

回答

2

从手册:

#pragma ghs Ostring 
Turns on optimizations. The optional string may contain any or all of the following letters: 
L — Loop optimizations 
M — Memory optimizations 
S — Small (but Slow) optimizations 

#pragma ghs ZO 
Disables all optimizations, starting from the next function.