3 ms·
Nobody "cut corners". What do you call accessing memory before checking permissions then? AMD do the check! Perfectly slowly too. A simple predictor that ass
by gaius 9y ago
Nobody "cut corners".
What do you call accessing memory before checking permissions then? AMD do the check!
Perfectly slowly too.
A simple predictor that assumes backwards branches will be taken (loops) and forward branches (most likely exceptions) will not is really all you need, if you insist.
- lorenzhs 9y agoYou appear to be confusing Meltdown and Spectre. This is about Spectre Variant 2. You're describing Meltdown. Also, the fault is queued and not discarded. If the branch ends up being taken, you'll get a fault for accessing a forbidden part of memory. If not, the CPU "undoes" the speculatively executed part as if it never happened. The Meltdown issue is that it doesn't undo the cache effects, which nobody thought to be a big deal, and which are very hard to undo. Also, you severely underestimate the speedups gained by a better branch predictor. There's a nice writeup at https://danluu.com/branch-prediction/ https://danluu.com/branch-prediction/ if you're interested.