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.

TMS320F28388D: C2000 Compiler Not Using CMP64 Instruction

Part Number: TMS320F28388D

Tool/software:

Hello,

I have some code that is comparing 64 bit values.  When the compiler builds this code, it searches for an assembly subroutine by the name of __c28xabi_cmpull which is supplied in a TI support library file ll_cmp28.asm.

We are wondering why the complier uses this assembly subroutine rather than using the available CMP64 instruction noted in this document TMS320C28x CPU and Instruction Set (Rev. F).? 

Attached is an example preprocessed source file, compiler version, and compiler options used.  You can open the generated main.obj file and search for "__c28xabi_cmpull" to see that the compiler is attempting to use this assembly function rather than the CMP64 instruction.  

If this is intended behavior, are there any plans to update the compiler to use the CMP64 instruction instead?

Thanks,
Will

Building file: "../main.c"
Invoking: C2000 Compiler
"C:/ti/ccs1031/ccs/tools/compiler/ti-cgt-c2000_22.6.1.LTS/bin/cl2000" -v28 -ml -mt --cla_support=cla1 --float_support=fpu32 --idiv_support=idiv0 --tmu_support=tmu0 --vcu_support=vcu2 -Ooff --fp_mode=relaxed --advice:performance=all --define=CHAR_SIZE_16_BIT --define=CAN_FD --define=_FLASH --define=DEBUG --define=CPU1 --preproc_with_comment --preproc_with_compile --diag_suppress=10063 --diag_warning=225 --diag_wrap=off --display_error_number --gen_func_subsections=on --abi=eabi --asm_define=CPU_SELECTION=1 --asm_define=CPU1=1 "../main.c"
Finished building: "../main.c"

typedef unsigned long long UINT64;
typedef signed long long   INT64;

int main (void)
{
   UINT64 five = 5U;
   UINT64 ten = 10U;

   if (five < ten)
      return 0;

   return 1;
}