So just to clarify. Do you think that the two-shift-approach would perform
better than move+bfc on ARMv7? That would surprise me, but I am no ARM expert.

If you look at the A9 Technical Reference Manual, this page explains that BFC is
a two cycle instructions, whereas MOV with constant shift is single cycle:
http://infocenter.arm.com/help/topic/com.arm.doc.ddi0388i/Chdgjcci.html

So shift right/left will be two cycles, and MOV + BFC three. However, if the
source and destination register are the same, only BFC would be required, and
would take two cycles with slightly smaller code.

The only way to be sure is to benchmark it ;)

https://codereview.chromium.org/11090021/

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to