Next: , Previous: , Up: Assembler Instructions   [Contents][Index]


5.3.2 jprob Instruction

This instruction has the following forms:

        jprob   number, loc_label
        jprob   var_name, loc_label

It specifies control transfer to location label loc_label with probability number or with a probability stored in variable var_name. Probability number must be in the range 0 to 1 inclusive. The assembler supports fixed-point and exponential notations for number.

The jprob instruction effectively sets a profile probability in the action emission matrix or at least one profile probability in the state transition matrix. If a contiguous block of jprob instructions is prepended with an stt instruction, then those jprob instructions will set profile probabilities in the action emission matrix. If a contiguous block of jprob instructions is not prepended with an stt instruction, then those jprob instructions will set profile probabilities in the state transition matrix. See stt Instruction, for more information.

If the assembler considers it should assemble a user instruction at a particular place but encounters a contiguous block of jprob instructions at that place, then the assembler will assemble the nop instruction and treat the contiguous block as possible transitions to states made after invocation of this nop instruction.

Let us consider a block of jprob instructions like this:

        jprob   prob1, L1
        jprob   prob2, L2
        jprob   prob3, L3

Probabilities of jumps to various destinations are below:

Jump destinationProbability value
Location label L1prob1
The second jprob instruction1-prob1
Location label L2(1-prob1)*prob2
The third jprob instruction(1-prob1)*(1-prob2)
Location label L3(1-prob1)*(1-prob2)*prob3
An instruction that follows the third jprob instruction(1-prob1)*(1-prob2)*(1-prob3)

Next: , Previous: , Up: Assembler Instructions   [Contents][Index]