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.

CCS: Illegal register for conditional : [A6]ADD .L1 A5,A0,A4

Tool/software: Code Composer Studio

Good day!

I try to compile simple program: sum numbers at array only if current number (at array) >0.

But i can not complile code:

 .ref _c_int00     ;
_c_int00:	
 .data 
array1:	.int 2,-1,47,-99 
size	.set 4 

 .text 
	MVKL .S1 array1,A3 
	MVKH .S1 array1,A3

	MVK .S1 size,A2 
	MVK .S1 0,A0 
	MVK .S2	0,B2 
	MVK .S1 0,A6
	MVK .S1 0,A4
	MVK .S1 0,A5
LOOP:
	SUB .L1 A2,1,A2 ;A2 := A2 - 1
   ;	MVK .S2 -1,B3
	LDW .D1 *A3[A2],B2 
	NOP 4 
	CMPGT .L1 A5,0,A6 
	NOP 6
	[A6]ADD .L1 A5,A0,A4 
	NOP 5
	[A2]B .S1 LOOP 
	NOP 5

	ERROR!   at line 24: [E0003] Illegal register for conditional
		[A6]ADD .L1 A5,A0,A4 

I try many ways to fix this problem, but i can not do this.

If i change A6 to B2 (for example), it compiles well.

What i do wrong?

Thank you!

Target is: TMS320C6ZXX.

Code Composer 3.3.