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.

Compiler/TMS570LS3137: Clarification on memcpy_t2.asm

Part Number: TMS570LS3137


Tool/software: TI C/C++ Compiler

Hi RI Experts,

I am using memcpy_t2.asm file from the Ti Library.

In start of the function says stack usage is zero, but inside the code it uses PUSH and POP instructions. 

I did not understand how stack usage is zero here, can you please help me how stack is zero here.

__TI_C$MEMCPY: .asmfunc stack_usage(0)

_ovr16: PUSH {r4 - r6} ; COPYING 16 BYTES OR MORE.
SUBS r2, #16 ;
_lp16: LDMIA r1!, {r3 - r6} ;
STMIA r0!, {r3 - r6} ;
SUBS r2, #16 ;
BCS _lp16 ;
POP {r4 - r6} ; RESTORE THE SAVED REGISTERS AND
ADDS r2, #16 ; CONTINUE THE COPY IF THE REMAINDER
BEQ _ret_ ; IS NONZERO.6170.memcpy_t2.asm

  • Thank you for pointing out this issue.  It appears the stack_usage number is incorrect.  I filed the entry CODEGEN-6690 in the SDOWP system to have this investigated.  You are welcome to follow it with the SDOWP link below in my signature.

    Thanks and regards,

    -George