By: Gabriele Svelto (gabriele.svelto.delete@this.gmail.com), July 8, 2015 2:01 am
Room: Moderated Discussions
Paul A. Clayton (paaronclayton.delete@this.gmail.com) on July 7, 2015 7:43 am wrote:
> To "predicate" a store, one selects the address (either the ordinary address or a
> safe but unused address ) and performs the store. A store is more expensive than just
> an ALU operation, but it could still be cheaper than a branch misprediction.
An instruction such as isel can be easily reproduced using a sequence of other instructions (see Hacker's Delight for a zillion short sequences suitable for the task) but that's not the point. It just costs more than using an isel (both in terms of execution time and resources spent in implementing it) and the same applies to making a store output to a dummy address. You need to setup the appropriate address (unless your processor already has one), load it to a dedicated register or synthesize it, etc... In the end it's more work and more cycles/power spent than just jumping over a store that effectively causes it to be dismissed if the jump is taken.
> To "predicate" a store, one selects the address (either the ordinary address or a
> safe but unused address ) and performs the store. A store is more expensive than just
> an ALU operation, but it could still be cheaper than a branch misprediction.
An instruction such as isel can be easily reproduced using a sequence of other instructions (see Hacker's Delight for a zillion short sequences suitable for the task) but that's not the point. It just costs more than using an isel (both in terms of execution time and resources spent in implementing it) and the same applies to making a store output to a dummy address. You need to setup the appropriate address (unless your processor already has one), load it to a dedicated register or synthesize it, etc... In the end it's more work and more cycles/power spent than just jumping over a store that effectively causes it to be dismissed if the jump is taken.