world leader in high performance signal processing
Trace: » if_cc_jump

IF CC JUMP

General Form

IF CC JUMP destination
IF !CC JUMP destination

Syntax

IF CC JUMP pcrel11m2 ;        /* branch if CC=1, branch predicted as not taken, 16-bit */
IF CC JUMP pcrel11m2 (bp) ;   /* branch if CC=1, branch predicted as taken, 16-bit  */
IF !CC JUMP pcrel11m2 ;       /* branch if CC=0, branch predicted as not taken, 16-bit  */
IF !CC JUMP pcrel11m2 (bp) ;  /* branch if CC=0, branch predicted as taken, 16-bit  */
IF CC JUMP user_label ;       /* user-defined absolute address label, resolved by the assembler/linker to the appropriate PC-relative instruction, 16-bit  */
IF CC JUMP user_label (bp) ;  /* user-defined absolute address label, resolved by the assembler/linker to the appropriate PC-relative instruction, 16-bit  */
IF !CC JUMP user_label ;      /* user-defined absolute address label, resolved by the assembler/linker to the appropriate PC-relative instruction, 16-bit  */
IF !CC JUMP user_label (bp) ; /* user-defined absolute address label, resolved by the assembler/linker to the appropriate PC-relative instruction, 16-bit */

Syntax Terminology

pcrel11m2
11-bit signed even relative offset, with a range of –1024 through 1022 bytes (0xFC00 to 0x03FE). This value can optionally be replaced with an address label that is evaluated and replaced during linking.
user_label
valid assembler address label, resolved by the assembler/linker to a valid PC-relative offset

Functional Description

The Conditional JUMP instruction forces a new value into the Program Counter (PC) to change the program flow, based on the value of the CC bit. The range of valid offset values is –1024 through 1022.

Option

The Branch Prediction appendix (bp) helps the processor improve branch instruction performance. The default is branch predicted-not-taken. By appending (bp) to the instruction, the branch becomes predicted-taken. Typically, code analysis shows that a good default condition is to predict branch-taken for branches to a prior address (backwards branches), and to predict branch-not-taken for branches to subsequent addresses (forward branches).

Flags Affected

None

Required Mode

User & Supervisor

Parallel Issue

This instruction cannot be issued in parallel with other instructions.

Example

if cc jump 0xFFFFFE08 (bp) ;  /* offset is negative in 11 bits, so target address is a backwards branch, branch predicted */
if cc jump 0x0B4 ;            /* offset is positive, so target offset address is a forwards branch, branch not predicted */
if !cc jump 0xFFFFFC22 (bp) ; /* negative offset in 11 bits, so target address is a backwards branch, branch predicted */
if !cc jump 0x120 ;           /* positive offset, so target address is a forwards branch, branch not predicted */
if cc jump dest_label ;       /* assembler resolved target, abstract offsets */

Also See

Special Applications

None