3 ms·
Apparently modern Intel CPUs will fuse JO instructions to preceding adds, producing the effect of dedicated "checked add" instructions: https://gist.github.com
by Gankro 10y ago
Apparently modern Intel CPUs will fuse JO instructions to preceding adds, producing the effect of dedicated "checked add" instructions:
https://gist.github.com/regehr/65252e90fb6bad82d533#gistcomment-1733637 https://gist.github.com/regehr/65252e90fb6bad82d533#gistcomm...
- chrisseaton 10y agoIn the examples the article this shows this will not help, as the overflow is in indirect addressing, not add instructions. I'm not a microcode expert but I guess arithmetic instructions, even without a jo, are not as efficient as indirect addressing, so we can't switch to arithmetic instructions with jo.
- dbaupp 10y agoThe efficiency of the add/jo combo does help (i.e. checking overflow isn't a total drag), it just doesn't completely solve the performance problem.
- chrisseaton 10y agoPerhaps we could have a new addressing mode that is the same as normal indirect but falls through and sets o if some part of it overflows. Then you'd do mov, jo which could then be fused. But I don't really know what I'm talking about.