Spectre v1 doesn't cross protection domains, and we want correct speculations to be able to cause cache misses.
In this case a good compiler can/should hoist the load out of the branches. So it doesn't matter if cpu can speculate it.
-
-
Not necessarily, because inc dword ptr [eax], for example, generates shorter code.
-
compare for example mov eax, dword ptr [ecx] test ebx, ebx je 1f inc eax jmp 2f 1: dec eax 2: mov dword ptr [ecx], eax test ebx, ebx je 3f inc dword ptr [ecx] jmp 4f 3: dec dword ptr [ecx] 4:
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.