pusha ; cpuid ; popa between every pair of instructions. ;-)
-
-
Jokes aside, closest you'll probably come is implementing a bytecode interpreter to make it implausible for uarch to make op times vary.
2 replies 0 retweets 0 likes -
Honestly your average interpreter is probably going to leak gobs of secret information into the branch predictor. this is a terrible idea.
2 replies 0 retweets 3 likes -
No branching needed.
2 replies 0 retweets 0 likes -
Replying to @RichFelker @erincandescent and
You forget that add (with pc as a possible operand) is Turing complete. :-)
2 replies 0 retweets 0 likes -
So instead you’re leaking into the caches and ITLB, since they’re now functioning as your branch predictor =)
1 reply 0 retweets 0 likes -
Replying to @stephentyrone @RichFelker and
(Also, add-to-PC is a branch that can be predicted)
1 reply 0 retweets 0 likes -
Not host pc. Virtual machine pc.
1 reply 0 retweets 0 likes -
Yeah, in that case see previous comment. The caches hold your branch history.
2 replies 0 retweets 0 likes -
Also modern branch predictors are *incredibly* good and will extract the bytecode program's branch history from the interpreter's branch history. Trying to disguise branches like this doesn't work
1 reply 0 retweets 1 like
The interpreter has NO BRANCHES. It's while (cycles--) { branchless stuff }
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.