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: The actual assembly instructions are different from the instructions in the manual.

Genius 3095 points
Part Number: TMS320F28377D


Dear team:

I compared the instructions in the manual with the assembly statements generated during compilation. It is found that the sentence "assemble absolute values" is different from the one written in the manual.

At CLA programming,Shouldn't assembling absolute values use statements like MMABSF32 MRa, MRb 32-Bit Floating-Point Absolute Value?

The "Floating Point mode" is chosen as “relaxed”.

66               TempSetPoint  = abs(F_SetPoint);
          C$L7:
0000a11c:   73C08908    MMOV32     MR0, @0x8908, UNCF
0000a11e:   78410000    MMOVIZ     MR1, #0x0
0000a120:   7D600000    MF32TOI32  MR0, MR0
0000a122:   7F200004    MCMP32     MR0, MR1
0000a124:   7FA00000    MNOP       
0000a126:   7FA00000    MNOP       
0000a128:   7FA00000    MNOP       
0000a12a:   7983000A    MBCNDD     0xa, GEQ
0000a12c:   7FA00000    MNOP       
0000a12e:   7FA00000    MNOP       
0000a130:   7FA00000    MNOP       
0000a132:   7CE00004    MSUB32     MR0, MR1, MR0
          C$L8:
0000a134:   7D800000    MI32TOF32  MR0, MR0
0000a136:   74C08906    MMOV32     @0x8906, MR0

Best regards

  • In C, abs() returns the absolute value of an integer.  If you want the absolute value of a float, use fabsf().  You should then see something like:


    0000a01c: 73C01480 MMOV32 MR0, @0x1480, UNCF
    0000a01e: 7E200000 MABSF32 MR0, MR0
    0000a020: 74C08902 MMOV32 @0x8902, MR0

    Regards,

    Richard