Re:The Performance Cost of Integer Overflow Checking
by anewhnaccount on Thursday December 18, 2014 @04:14AM
(#8766572)
I'm pretty rusty so excuse me if I'm spouting nonsense, but I think MRS (read register file) has a dependency on the value of Q (so q/add/sub/clear) and operations which OR a new value with Q (q/add/sub [do q |= 0 or q |= 1) have a dependency on operations which change the register file (MSR). Basically qadd and qusb commute on Q. I'm a bit fuzzy on the details, but I think this means that you just have to stall/predict when there's about to be a branch anyway. Please correct me/clarify if I'm wrong.
[ Parent
| on HN ]
Re:The Performance Cost of Integer Overflow Checking
by chrisseaton on Thursday December 18, 2014 @04:20AM
(#8766586)
Yeah you have to predict - so just predict not taken, and treat JO as an uncommon trap. I think that works well in practice.