Other Parts Discussed in Thread: C2000WARE
Tool/software: TI C/C++ Compiler
Hi,
I want to understand how an assignment of 2 struct variables are handled by the compiler. I have 2 struct variables a and b of same type and I am doing a = b.
If I look at the asm file generated by the compiler (I used C28x compiler v18.9), I see it gets translated to couple of MOV and RPT instruction. I tried with optimization enabled and disabled
However when I compile the same code using a different makefile (same compiler version), I see that it uses memcpy function instead. The makefile is quite large and spans across multiple files. Hence I am unable to send the same.
I want to understand in what cases does the struct assignment use memcpy function? Is it some compiler/linker flag or is there any other dependencies?
Thanks,
Veena