Part Number: TMS320F280039C
Tool/software:
Hi team
Customer report that they use two similar instructions in his code, but the disassembly is a little bit change, which effect the application:
the first instruction is:
![]()
Corresponding disassembly is:

the operation is clean BatLogic.BatStatus then give the new value to it. This bring the risk that the program get the wrong result, if ISR happens when this variable is cleaned, and ISR use this value.
But for the second instruction:
![]()
Corresponding disassembly is:

AH will store the value temporarily and then copy to PVLogic directly, which can avoid the risk above.
Could you please help to explain why the differences happens and what should be taken care in c code to avoid the first case.
Thanks
Joe