The ibrl instruction increments a counter and branches to a label if one is less than the other.
Synopsis
ibrl(type.dst,type.src,
label
)
Description
The ibrl instruction is intended for loop control by testing for equality of two variables. It determines whether to make another pass through a loop or to execute the next sequential instruction. The destination value is incremented by one, and then compared to the source value. If type.dst is less than type.src, execution jumps to the labeled instruction.
Example
In the following example, after doing some other tasks, r.3 is increased by 1 and compared with r.1. If r.3 is less than r.1, the loop is repeated at the label SW1_CTRL. Otherwise, the next instruction is executed which takes the program to end_loop.
SW1_CTRL:
..... ......... ..................
ibrl(r.3,r.1,SW1_CTRL)
end_loop: