This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS320F28027: Goto statement issue

Part Number: TMS320F28027

Hi team,

Here's an issue from the customer may need your help:

Regarding DSP and DSC chip, when using C programming language, the customer would like to know if the large amount of goto statements will affect the execution speed of the program.

And when CCS is compiled, the goto statement generates the assembly corresponding to the code instruction, which one corresponds to?

Could you help check this case? Thanks.

Best Regards,

Cherry Zhou

  • the customer would like to know if the large amount of goto statements will affect the execution speed of the program

    There is no reason to think so.  That said, a large amount of goto statements is likely to make the code difficult to understand and maintain.

    when CCS is compiled, the goto statement generates the assembly corresponding to the code instruction, which one corresponds to?

    Use the compiler option --src_interlist.  By default, the assembly source file generated by the compiler is deleted.  This option causes it to be kept.  In addition, comments are added which make it easier to understand the assembly code.  You can see what branch instructions are generated for the goto statements.

    Thanks and regards,

    -George

  • Hi George,

    Thanks for your help.

    After compiling, how to check the total amount of code? 

    Thanks and regards,

    Cherry

  • how to check the total amount of code? 

    One good way is to look at the map file generated by the linker.  A graphical view of it is supported by CCS.  Make sure your project is selected in the Project Explorer view.  Then choose View -> Memory Allocation.  Or, in the folder named after the current build configuration (often Debug), double-click on the file named name of project.map, then view it in the editor.

    Thanks and regards,

    -George