













Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!














With so much discussion in respect of preserve exception behavior of speculated instructions using hardware support, let us extend our discussion on the compile time hardware support for memory reference speculation
H/W support for Memory Disambiguation (Address Certainty)
While reducing the critical path length of the code, i.e., to optimize codes, it may be desirable to move the LOAD(s) across STORE(s) For example, in the following code segment if the latency of LOAD is high, it may be desirable to move LOAD before STORE
H/W support for Memory Disambiguation (Address Certainty)
For example, in the following code segment; if the latency of LOAD is high, it may be desirable to move LOAD before STORE for desirable optimization
H/W support for Memory Disambiguation (Address Certainty)
..... SD R1, 0(R2) LD R3, 0(R4) ADD R3, R3, # ……
LD R3, 0(R4) ..... SD R1, 0(R2) ADD R3, R3, # ……
H/W support for Memory Disambiguation (Address Certainty)
This issue can be resolved by providing rum-time memory address (certainty) disambiguation In order to resolve this issue, two special instructions are included in the ISA These instructions are …..
H/W support for Memory Disambiguation
LDS R1, 0(R2) ;Load Speculatively
LD R3, 0(R4) ..... SD R1, 0(R2) ADD R3, R3, #
H/W support for Memory Disambiguation
Here, LOAD is speculatively moved across the STORE, and The LDV instruction is left at the original place of LOAD instruction (i.e., after the STORE instruction, in this example) which acts like a guardian and checks for the address conflict
H/W support for Memory Disambiguation
When the speculated load LDS is executed, the hardware saves the address of the accessed memory location in log table and finds ….
1: If the subsequent STORE changes the location before the check instruction LDV, then speculation has failed; whereas ……
Handling Failure…
1: If only the load instruction was speculated then it is sufficient to redo the load
H/W support for Memory Disambiguation
2: If the additional instruction (LDV) is also speculated then