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.

TMS320F28335: TMS320F28335 with floating point enabled, why interrupt service function context save only saved RB,R0H,R1H, R2H, R3H, and STF partial floating-point register

Part Number: TMS320F28335

Hi Team,

There's an issue from the customer need your help:

Recently ported OS to DSP28335, need to consider CPU floating point register context save, disassembly discovery, interrupt service context only RBS, R0H, R1H, R2H, R3H, and STF. Other floating-point related registers are not saved, does this not affect floating-point calculations? 

CCS version :12.1.0.00007, latest compiler, other older compilers have tried it as well, both of which are the same. Disassembles code for an interrupt service function as shown in the following figure:

I look at the technical document for floating point registers as shown in the figure, the red circle part is not saved:

Could you help check this case please? Thanks,

Best Regards,

Ben

  • Hello Ben,

    It may be the case that because the ISR is being written in C, the compiler is only saving the registers that it uses within the ISR, or that are available to use in the ISR (where saving the other registers is not necessary). I will forward this to the compiler team to see if they can confirm this.

    Best regards,

    Omer Amir

  • Other floating-point related registers are not saved, does this not affect floating-point calculations? 

    No.  Consider, for example, the register R4H.  It is not explicitly preserved like R3H.  That is because register conventions observed by the compiler preserve R4H.  Please search the C28x compiler manual for the sub-chapter titled TMS320C28x Register Use and Preservation.  Understand the distinction between the terms save on entry and save on call.  When an interrupt occurs, all of the registers that get modified must be preserved.  If the interrupt function calls another function like TaskTs, it does not have to preserve every register.  It only has to preserve the save on call registers.  If TaskTs modifies R4H, register conventions require that TaskTs preserve R4H, not the function which calls TaskTs.  The same thing is true of other registers, such as XAR1.

    Thanks and regards,

    -George