Tool/software: TI C/C++ Compiler
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.
Tool/software: TI C/C++ Compiler
Saurabh Shah1 said:I read somewhere that if RET instruction is on odd address, due to parallel pipeline execution, it can create an issue during execution.
I am unfamiliar with such a problem. If an unaligned RET instruction could cause incorrect execution, that would be a silicon exception and the compiler would need to deal with it. Where did you read this?
Saurabh Shah1 said:When i add ALIGN 16 to both of them, its working.
C55x text sections aren't supposed to need any alignment at all. That is, the CPU is supposed to be able to read and execute instructions from the .text section correctly, regardless of the alignment. Yes, certain constructs like RPTBLOCAL and RPTB may be affected by the alignment of the instruction, but you shouldn't need any alignment on the .text section to get correct execution.
On the other hand, alignment can affect the performance of the fetch pipeline. Some developers choose to align the .text section to avoid timing fluctuations due to small changes in the assembly code. Even so, the program should still execute properly, as far as the CPU is concerned.
Check that your .stack and .sysstack are both large enough, and that you have not overflowed one or the other. Which stack mode are you executing in? Does the stack mode change during the execution of the program?
Archaeologist said:I read somewhere that if RET instruction is on odd address, due to parallel pipeline execution, it can create an issue during execution.
Were you able to recall where you found this information?
What version of the compiler are you using? (It is different than the CCS version).
Are you passing the appropriate CPU version flags to the compiler so that it can check all known silicon exceptions?
Archaeologist said:Were you able to recall where you found this information?
No.
Archaeologist said:What version of the compiler are you using? (It is different than the CCS version).
Archaeologist said:Are you passing the appropriate CPU version flags to the compiler so that it can check all known silicon exceptions?
Yes.
Custom Target (-v) : 5502