Re:Finding a CPU Design Bug in the Xbox 360
by Gibbon1 on Monday January 08, 2018 @05:59AM
(#16095954)
I'm going to assume that somewhere in the code was something like
And the branch predictor would decide the xdcbt branch was most likely, executes xdcbt and then realizes oops and does it the safe way. Which would be okay except xdcbt is evil, it breaks cache coherency.
[ Parent
| on HN ]
Re:Finding a CPU Design Bug in the Xbox 360
by unwind on Monday January 08, 2018 @08:55AM
(#16096704)
Nitpick: you meant & for a bitwise AND, of course.
Re:Finding a CPU Design Bug in the Xbox 360
by djhworld on Monday January 08, 2018 @09:31AM
(#16096916)
Wow, interesting to see feature flags causing this undesired effect!
Re:Finding a CPU Design Bug in the Xbox 360
by syncsynchalt on Monday January 08, 2018 @05:01PM
(#16101094)
Any if statement could cause this, doesn't have to be feature flags.
An untrained branch predictor could still take the "wrong" path even if none of the code that calls that if statement takes the bad path. That's presumably what happened here, the calling program removed all instances of PREFETCH_EX but the CPU would still sometimes execute that branch, such as on the first run through that function.
This is a lot like the problem of "don't think of a pink elephant". The mere existence of the "evil opcode" in the library means the CPU might execute it under certain circumstances.