Hi George,
I have a question about the compilation tool chain of C3x series.
We have two kinds of devices and each of them use different tool chain, one is 4.70 and another is 5.11. What differences are there in the two set of compilation tool chain?
Tool chain v4.70
Tool chain v5.11
I use the different tool chain to compile a same file and I get the different .asm files.
By using v4.70, I get the following assembly code.
****************************************************** * TMS320C30 C COMPILER Version 4.70 ****************************************************** ; C:\tic3x4x\c3x4x\cgtools\bin\ac30.exe -v31 -q -mr -x -dNDEBUG -dNU_NO_ERROR_CHECKING -dCR_INC_STATUS -dCR_INC_RX_MSTAG -i\Tools\ ; C:\tic3x4x\c3x4x\cgtools\bin\opt30.exe -v31 -q -r -a -f -O2 C:\DOCUME~1\micom\LOCALS~1\Temp\security.if C:\DOCUME~1\micom\LOCALS ; C:\tic3x4x\c3x4x\cgtools\bin\cg30.exe -v31 -q -p -a -c -i -a C:\DOCUME~1\micom\LOCALS~1\Temp\security.opt security.asm C:\DOCUME~1\micom\LOCALS~1\Temp\security.tmp .version 31 FP .set AR3 .globl _atof .globl _atoi .globl _atol .globl _strtod .globl _strtol .globl _strtoul .globl _rand .globl _srand .globl _calloc .globl _free .globl _malloc .globl _bmalloc .globl _minit ... BZ L7 NEGI R2,AR2 OR @CONST+7,AR2 CALL _plerr_HandleError ...
By using v5.11, I get the following assembly code.
;****************************************************************************** ;* TMS320C3x/4x ANSI C Code Generator Version 5.11 * ;* Date/Time created: Mon Jul 14 16:25:21 2014 * ;****************************************************************************** .regalias ; enable floating point register aliases fp .set ar3 FP .set ar3 ;****************************************************************************** ;* GLOBAL FILE PARAMETERS * ;* * ;* Silicon Info : C31 Revision PG1-5 * ;* Optimization : Always Choose Smaller Code Size * ;* Memory : Small Memory Model * ;* Float-to-Int : Fast Conversions (round toward -inf) * ;* Multiply : in Software (32 bits) * ;* Memory Info : Unmapped Memory Exists * ;* Repeat Loops : Use RPTB for ALL Loops -- Disallow RPTS * ;* Calls : Normal Library ASM calls * ;* Debug Info : No Debug Info * ;****************************************************************************** ; S:\Tools\texas\ti\c30\bin_511\opt30.exe -v31 -q -r -a -f -O2 C:\Users\SESA15~1\AppData\Local\Temp\security.if C:\Users\SESA15~1\AppData\Local\Temp\security.opt ... cmpi 0,r0 ; |1178| ldine @CL11,ar2 ; |1185| callne _plerr_HandleError ...
Here comes another question, why I use almost the same compilation command to compile the same file by using two compilation tool chain, the result is so different from each other?
You can see from the above example, one is "TMS320C30 C COMPILER" while another is "TMS320C3x/4x ANSI C Code Generator", and one uses CALL instruction and another uses callne instruction.