By: none (none.delete@this.none.com), February 17, 2013 4:36 pm
Room: Moderated Discussions
Linus Torvalds (torvalds.delete@this.linux-foundation.org) on February 17, 2013 11:54 am wrote:
[...]
> (d) you can do it with a single CC and trivial optimizations. For example, in this case, you can do it
> with two subtracts and one 'or', and then checking the result of the 'or' for being zero. So your example
> could be trivially done with three instructions, and the 'or' just sets the CC bits implicitly.
ARMv8 has introduced a conditional compare instruction that would reduce that to two instructions.
[...]
> (d) you can do it with a single CC and trivial optimizations. For example, in this case, you can do it
> with two subtracts and one 'or', and then checking the result of the 'or' for being zero. So your example
> could be trivially done with three instructions, and the 'or' just sets the CC bits implicitly.
ARMv8 has introduced a conditional compare instruction that would reduce that to two instructions.