I met a error about branch instruction when debug, and I could find out the reason.
Enviroments is: CCS 3.3 + DM6446
[ Example A ]
;cycle 1
MVK 1, A0 <--- Note: A0 is true
;cycle 2
[A0] B mylabel
;cycle 3
NOP
;cycle 4
NOP
;cycle 5
NOP
;cycle 6
NOP
;cycle 7
NOP
;cycle 8
NOP
;cycle 9
NOP
;cycle 10
NOP
mylabel:
;cycle 11
NOP
;cycle 12
NOP
The result is right when run this code, after "[A0] B mylabel" in cycle 2, the program is branch to cycle 11.
But the following code is wrong:
[ Example B ]
;cycle 1
MVK 0, A0 <--- Note: A0 is false
;cycle 2
[A0] B mylabel
;cycle 3
NOP
;cycle 4
NOP
;cycle 5
NOP
;cycle 6
NOP
;cycle 7
NOP
;cycle 8
NOP
;cycle 9
NOP
;cycle 10
NOP
mylabel:
;cycle 11
NOP
;cycle 12
NOP
After the execute of "[A0] B mylabel", the program is branch to cycle 8. I think it should go to cycle 3
because A0 is false. Could you tell me the reason, and I cannot find out the answer within relative documents.
Thinks a lot!