This preview shows page 1. Sign up to view the full content.
Unformatted text preview: e .L3 negl %eax .L3: movl %ebp,%esp popl %ebp ret Get val Test it If >0, goto end Else, negate it end: (a) C code. (b) Assembly code. Figure 5.29: Absolute Value Code We use this to measure the cost of branch misprediction. until the actual outcome has been determined. If the prediction is correct, the processor simply “commits” the results of the speculatively executed instructions by storing them in registers or memory. If the prediction is incorrect, the processor must discard all of the speculatively executed results, and restart the instruction fetch process at the correct location. A signiﬁcant branch penalty is incurred in doing this, because the instruction pipeline must be reﬁlled before useful results are generated. Once upon a time, the technology required to support speculative execution was considered too costly and exotic for all but the most advanced supercomputers. Since around 1998, integrated circuit technology has made it possible to put so much circuitry on o...
View Full Document
- Spring '10
- The American