3.7.2 Conditional Branch Target Addressing
Options
The conditional branches (be, bea, bel, bela) carry the displacement to the branch target address as
a signed 16-bit value (the 14-bit
BO
field right-extended with
ObOO).
The displacement enables
conditional branches to cover an address range of ยฑ32KB.
For the relative (AA
=
0)
forms (be, bel), the target address is the CIA plus the signed displacement.
For the absolute (AA
=
1)
forms (bea, bela), the target address is 0 plus the signed displacement. If
the sign bit
(BO[O])
is
0,
the displacement is the target address. If the sign bit is
1,
the displacement is
negative and wraps to the highest memory addresses. For example, if the displacement is OxFFFC
(the 16-bit representation of
-4),
the target address is OxFFFF' FFFC
(0
-
4B,
or 4 bytes from the top
of memory).
3.7.3 Conditional Branch Condition Register Testing
Conditional branch instructions can test a CA bit. The value of the
BI
field specifies the bit to be tested
(bit 0-31). The
80
field controls whether the CA bit is tested, as described
in
the following section.
3.7.4 BO Field on Conditional Branches
The
80
field of the conditional branch instruction specifies the conditions used to control branching,
and specifies how the branch affects the CTA.
Conditional branch instructions can test one bit
in
the CA. This option is selected when
80[0]
=
0;
if
80[0]
=
1,
the CA does not participate
in
the branch condition test. If this option is selected, the
condition is satisfied (branch can occur) if
CA[81] =
80[1].
Conditional branch instructions can decrement the CTA by one, and after the decrement, test the
CTA value. This option is selected when
80[2]
=
o.
If
this option is selected,
80[3]
specifies the
condition that must be satisfied to allow a branch to be taken.
If
80[3]
=
0,
CTA
'*
0 is required for a
branch to occur.
If
80[3]
=
1,
CTA = 0 is required for a branch to occur.
If
80[2]
=
1,
the contents of the CTA are left unchanged, and the
CTA
does not participate in the
branch condition test.
Table 3-17 summarizes the usage of the bits of the
80
field.
80[4]
is further discussed
in
"8ranch
Prediction:'
Table 3-17. Bits
of
the BO Field
BO
Bit
Description
BO[O]
CR Test Control
o Test CR bit specified by
BI
field for value specified by BO[1]
1 Do not test CR
BO[1] CR
Test Value
o Test for CR[BI] =
O.
1 Test for CR[BI] = 1.
BO[2] CTR Test Control
o Decrement CTR by one and test whether CTR satisfies the
condition specified by
BO[3].
1 Do not change CTR, do not test CTA.
Preliminary
Programming Model 3-35