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.

CLA branch instruction status flag

When the documentation states that

I1

I2

I3

I4

MBCNDD

It states that I1 is the last instruction that can affect the flags for MBCNDD does it mean that I can't use instructions in I2, I3, and I4 that affect the flags?  Or does it mean that this is the last instruction that the MBCNDD instruction will see the status of the flags...  meaning I can continue to put instructions in I2,I3,I4 that affect the flags, but they won't affect MBCNDD?

ie:  is the result of I1 the instruction that will determine the branch based on the flags it sets?

Also, if I1 is a parallel instruction say MMPYF32|M|SUBF32 how does this affect the branch?  since two instructions are essentially being executed at the same time?

  • Rob Barton said:
    It states that I1 is the last instruction that can affect the flags for MBCNDD does it mean that I can't use instructions in I2, I3, and I4 that affect the flags?  Or does it mean that this is the last instruction that the MBCNDD instruction will see the status of the flags...  meaning I can continue to put instructions in I2,I3,I4 that affect the flags, but they won't affect MBCNDD?

    I1 is the only instruction to affect the branch. I2-I4 can alter the status flags but it wont change the course the branch takes

    Rob Barton said:
    Also, if I1 is a parallel instruction say MMPYF32|M|SUBF32 how does this affect the branch?  since two instructions are essentially being executed at the same time?

    Its a wired OR condition between the parallel instructions. This particular combination MPY||SUB alters the LUF, LVF flags. Either one of the instructions, or both, can set the flags. The branch looks at the OR'd flags.