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.

TMS320F28377D: About the compiler documentation

Part Number: TMS320F28377D

Hi, the ASM output generated after compilation does not match the output shown for the __abs16_sat function in the “Intrinsics” section of the TMS320C28x Optimizing C/C++ Compiler v22.6.0.LTS User's Guide (Rev. Z). Page 163 states the following:

 

SETC OVM

MOV AH, src

ABS ACC

MOV dst , AH

CLRC OVM

 

However, when I compile it, the output is as follows:

SETC OVM ;

SETC SXM ;

MOV ACC,AL << 16 ;

ABS ACC ;

MOV AL,AH ;

CLRC OVM ;

Here, “SETC SXM” has been added, and the line “MOV AH, src” has been changed to “MOV ACC,AL << 16”. Of course, I understand this adjustment was made to ensure the function runs safely. However, I believe these changes should also be noted in the documentation. I need to provide my manager with a reference containing the actual code to use these functions. I’m not sure where else there are differences. I’d appreciate any help you can offer.

 

Note: I’m using CCS. The compiler version is v22.6.1.LTS. For this compiler, I’m directed to the same documentation as for version v22.6.0.LTS.

  • The intrinsic expansion depends on the surrounding code context including arguments, ABI, etc. The user guide only provides a simplified expansion that is representative of the expected generated sequence. The user guide listing is intended to convey what the intrinsic accomplishes, eg: - it sets overflow mode, takes the absolute value, and clears overflow mode, etc, while using a simplified expansion as an example. If you need a reference with the actual code generated then use compiler option --src_interlist and review the generated assembly that corresponds to the line number associated with the intrinsic.

    I filed EXT_EP-13290 for updating user guide table 7-6 with above details. You are welcome to follow it with that link.