bgt $src1, Imm
Branch Greater Than Taken. Conditionally put the current PC+4 into register 30, and set the NPC to be the
address specified by the immediate field.
Format
This is a BAL format instrucion.
31-26 |
25-21 |
20-0 |
110 111 |
src1 |
21-bit Imm |
Functional Description
The bgt instruction conditionally places the current PC+4 in GPR(30), and conditionally changes the next instruction PC value to the (zero-extended) 21-bit immediate value. If bit 2 (GT) of register src1 is 1, the condition is met. If bit 2 of register src1 is 0, the next PC executed will be the current PC+4, and GPR(30) will be unchanged. This instruction gives a hint to the branch predictor
to predict the branch taken.
if(GPR(src1)[2] == 1) {
GPR(30) = PC+4; NPC = ZERO_EXTEND(Imm);}
else NPC = PC+4;
Side Effects
None.
Processor Mode
This is a user-level instruction.
Last modified: Sat Mar 10 00:51:34 CST 2001