Hi,
We are using CCS version 6.0.1 and compiler version v18.1.0.LTS. For the development testing using automated breakpoint method, we would like to introduce assembly labels(__asm(" label name ");_, in the 'C' functions. However the compiler reference document does not recommend the same. Below is the excerpt from the compiler reference document that
NOTE: Avoid Disrupting the C/C++ Environment With asm Statements
Be careful not to disrupt the C/C++ environment with __asm statements. The compiler does
not check the inserted instructions. Inserting jumps and labels into C/C++ code can cause
unpredictable results in variables manipulated in or around the inserted code. Directives that
change sections or otherwise affect the assembly environment can also be troublesome.
Be especially careful when you use optimization with __asm statements. Although the
compiler cannot remove __asm statements, it can significantly rearrange the code order near
them and cause undesired results.
Please note we intend to use the labels to put breakpoints for the verification purpose and there won't be any GOTO statements associated with these labels. Can you please elaborate on the implications of inserting assembly labels. Will it result in an unpredictable environment?
Thanks,
Sundaram