mfbhrbe

Move From Branch History Rolling Buffer Entry

mfbhrbe RT, BHRBE

Reads a specific entry from the BHRB.

Details

The mfbhrbe instruction moves a Branch History Rolling Buffer Entry (BHRBE) from the BHRB into a general-purpose register. If the specified entry is within the range of implemented entries and Performance Monitor alerts are disabled, the contents of that entry are transferred to the target register; otherwise, zero is placed in the target register.

Pseudocode Operation

n ← BHRBE0:9
if n < number_of_BHRBEs_implemented then
    RT ← BHRBE(n)
else
    RT ← 640

Programming Note

The mfbhrbe instruction is used to access entries in the Branch History Rolling Buffer (BHRB). Ensure that the specified entry index is within the range of implemented entries to avoid placing zero in the target register. This instruction operates at user privilege level and does not generate exceptions under normal conditions.

Example

mfbhrbe r3, 0

Encoding

Binary Layout
31
0
RT
6
BHRBE
11
/
16
302
21
/
31
 
Format X-form
Opcode 0x7C00025E
Extension Base
Registers Altered BHRBE0:9

Operands

  • RT
    Target
  • BHRBE
    Entry Index