17.01.2013 Views

MIPS R10000 Microprocessor User's Manual - SGI TechPubs Library

MIPS R10000 Microprocessor User's Manual - SGI TechPubs Library

MIPS R10000 Microprocessor User's Manual - SGI TechPubs Library

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Coprocessor 0 263<br />

Errata<br />

There are two ways to read the branch prediction state from the Branch Prediction<br />

Table (BPT):<br />

• Place an mfc0 rx, C0_Diag (a Move From Diagnostic register to GPR rx)<br />

in the delay slot of the conditional branch. This read of the Diagnostic<br />

register returns the next predicted state from the branch stacks before<br />

the BPT is updated.<br />

• Move the Index and the BPT read operation into the Idx and BPOp field<br />

of the Diagnostic register. This mtc0 into CP0_Diag graduates as soon as<br />

the write is completed; however, there could be a significant delay in<br />

transferring the data from BPT to CP0_Diag. This delay occurs because<br />

C0_Diag has a lower priority to access the BPT as compared to the<br />

accesses by IFETCH and other processes. Thus, the prediction state<br />

read from the C0_Diag may not reflect the content of the BPT. Use the<br />

code sequence shown below to get the correct prediction state from<br />

the BPT:<br />

li rx # rx has index and BPT read for<br />

# Idx and BPOp, respectively.<br />

mtc0 rx, C0_Diag # Set the Diagnostic register for reading the BPT<br />

la ry, label # ry !=r31; la could be replaced by a dla for 64-bits<br />

jr ry # This gives priority for C0_Diag to access BPT<br />

label: mfc0 rz, C0_Diag # rz holds the state from BPT entry pointed by Idx<br />

<strong>MIPS</strong> <strong>R10000</strong> <strong>Microprocessor</strong> <strong>User's</strong> <strong>Manual</strong> Version 2.0 of January 29, 1997

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!