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.

CCS/AWR1642: problem about my code !

Part Number: AWR1642


Tool/software: Code Composer Studio

hi 

i used the awr1642 for my application,but i got a little bit problem about my code.more detail as below:

 is every Local variable will be mapped into the cpu register or the statck?

such as the for loop int the Disassembly :

2307 for (i = 0; i < NFFT; i++)


007f6e40: 5004A35B     [!B1] MVK.L2 1,B0
007f6e44: 7412104B     || [!B2] EXT.S2 B4,16,16,B8
007f6e48: 74A44058     || [!B2] ADD.L1 2,A9,A9
007f6e4c: 30001D11     [!B0] B.S1 $C$L280 (PC+232 = 0x007f6f28)
007f6e50: 7282002A     || [!B2] MVK.S2 0x0400,B5
007f6e54: 00150AFA     CMPLT.L2 B8,B5,B0
007f6e58: 6000A35A     [ B2] MVK.L2 0,B0
007f6e5c: 2FFFFC90     [ B0] B.S1 $C$L276 (PC-28 = 0x007f6e24)

it seems all the Local variable mapping into the register? if i got lots of  Local variable , will some problem gonna happen?

br

havi

  • Hello Havi,

    When the compiler optimizations are enabled, the variables are more likely to be stored in the registers.  Stack will be used if there are larger local variable . The compiler will analyse the code flow and select which variables are likely to be best stored in registers for optimum performance based on the optimizations enabled.

    This is more of a general runtime behavior of the code.

    What problem in your code are you referring ?

    Regards,

    Raghu

    ----------------------------------------------------------------------------------------------------------

    Please click the Verify Answer button on this post if it answers your question.

    ----------------------------------------------------------------------------------------------------------

  • Havi,

    Let me know if you have any further question on this post. Else we can close the post.

    Thanks,
    Raghu
  • hi Raghu
    i had solved this problem , thank you!
    br
    havi