BAR 16bitOffset,ARn,ARm,EQ/NEQ
6-60
BAR 16bitOffset,ARn,ARm,EQ/NEQ
Branch on Auxiliary Register Comparison
SYNTAX OPTIONS
OPCODE
OBJMODE
RPT
CYC
BAR 16bitOffset,ARn,ARm,EQ
1000 1111 10nn nmmm
CCCC CCCC CCCC CCCC
1
−
4/2
BAR 16bitOffset,ARn,ARm,NEQ
1000 1111 11nn nmmm
CCCC CCCC CCCC CCCC
1
−
4/2
Operands
16bit-
Offset
16-bit signed immediate constant offset value (
−
32768 to +32767 range)
ARn
Lower 16 bits of auxiliary registers XAR0 to XAR7
ARm
Lower 16 bits of auxiliary registers XAR0 to XAR7
Syntax
Description
Condition Tested
NEQ
Not Equal To
ARn != ARm
EQ
Equal To
ARn = ARm
Description
Compare the 16-bit contents of the two auxiliary registers ARn and ARm
registers and branch if the specified condition is true; otherwise continue
execution without branching:
If (tested condition = true) PC = PC + signed 16-bit offset;
If (tested condition = false) PC = PC + 2;
Note:
If (tested condition = true) then the instruction takes 4 cycles.
If (tested condition = false) then the instruction takes 2 cycles.
Flags and
Modes
None
Repeat
This instruction is not repeatable. If this instruction follows the RPT
instruction, it resets the repeat counter (RPTC) and executes only once.
Example
;
String compare:
MOVL XAR2,#StringA
; XAR2 points to StringA
MOVL XAR3,#StringB
; XAR3 points to StringB
MOV @AR4,#0
; AR4 = 0
Loop:
MOVZ AR0,*XAR2++
; AR0 = StringA[i]
MOVZ AR1,*XAR3++
; AR1 = StringB[i], i++
BAR Exit,AR0,AR4,EQ
; Exit if StringA[i] = 0
BAR Loop,AR0,AR1,EQ
; Loop if StringA[i] = StringB[i]
NotEqual:
; StringA and B not the same
.
Exit:
; StringA and B the same
Содержание TMS320C28x
Страница 30: ...1 12...
Страница 80: ...This page intentionally left blank 2 50 This page intentionally left blank...
Страница 269: ...IN loc16 PA 6 112 MOV AL 0 AL 0 UOUT IORegC AL IOspace IORegC AL 10...
Страница 308: ...MAXCUL P loc32 6 151 Saturate MOVL Var64 2 ACC Store result into Var64 MOVL Var64 P...
Страница 509: ...SUBL ACC P PM 6 352 SUBL ACC P PM ACC S B 11 M X 4 MOVH Y ACC 5 Store Q15 result into Y...
Страница 585: ...This page intentionally left blank 7 32 This page intentionally left blank...