TI中文支持网
TI专业的中文技术问题搜集分享网站

C6701优化屏障的问题

请问C6701如何插入优化屏障和内存屏障(读内存屏障、写内存屏障)?

就像x86架构下中的asm("":::"memory")作为优化屏障,lfence,sfence,wfence作为读、写、内存屏障指令?

或者有没有等效的方法和操作?

Tony Tang:

用下面指令可对函数指令优化选项,另外也可对文件指定优化选项。

#pragma FUNCTION_OPTIONS ( func, " additional options" );

The FUNCTION_OPTIONS pragma allows you to compile a specific function in a C or C++ file withadditional command-line compiler options. The affected function will be compiled as if the specified list ofoptions appeared on the command line after all other compiler options. In C, the pragma is applied to thefunction specified. In C++, the pragma is applied to the next function.

赞(0)
未经允许不得转载:TI中文支持网 » C6701优化屏障的问题
分享到: 更多 (0)