A related question is a question created from another question. When the related question is created, it will be automatically linked to the original question.
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.
Compiler/TMS320C6678: Hybrid programming,assembly,C language
Verify to be compliant to the EABI as per TI SPRAB89A C6000 Embedded Application Binary Interface.
For instance, You have to preserve A10-A15, B10-B15, A2 (see §3.2). Also it seems to me that your routine miss the return statement"B B3" (followed by a NOP 5).
Note that the behaviour can depend on the caller: if it does not use A11:A10, you routine could seem to work fine.
I also suggest to You tu use .asmfunc/.endasmfunc to mark the begin and end of assembler function (nicer for the debugger and mix asm/C).