I am trying to optimise some CLA code on the F28377D, using the Technical Reference Manual (spruhm8e) as a guide on the CLA instruction set and pipeline. I find where and when the condition flags in the MSTF register are read and updated to be ambiguous.
The TRM states that CLA conditional branches read the condition flags of the MSTF register in the D2 stage of the CLA pipeline ($5.5.1, p629), and that the last instruction that can modify the condition flags is 4 cycles previous (example 5-1, p631). Nowhere does the manual explicitly state in which pipeline stage modifications to the condition flags are made. Can you verify that for all instructions that modify the condition flags, the modification takes place in the EXE stage of the CLA pipeline?
There are several CLA instructions that are conditionally executed: "MMOV32 MRa, mem32 {, CNDF}", "MMOV32 MRa, MRb {, CNDF}", "MNEGF32 MRa, MRb {, CNDF}", "MSWAPF MRa, MRb {, CNDF}". The TRM does not state explicitly in which stage of the CLA pipeline the condition flags are read. Can you verify these instructions evaluate the condition flags in the D2 stage of the CLA pipeline?
"MNEGF32 MRa, MRb {, CNDF}" looks to update the condition flags regardless of the execution of the conditional negation, since if the condition is not true the instruction is essentially a "MMOV32 MRa, MRb". Is my understanding correct?
"MMOV32 MRa, mem32 {, CNDF}" and "MMOV32 MRa, MRb {, CNDF}" are conditionally executed instructions that modify the condition flags. Can you confirm that the condition flags are not updated if the condition is not true?