Emulating variable bit-shift using only constant shifts?

后端 未结 8 1281
清歌不尽
清歌不尽 2020-12-09 19:19

I\'m trying to find a way to perform an indirect shift-left/right operation without actually using the variable shift op or any branches.

The particular PowerPC pro

8条回答
  •  甜味超标
    2020-12-09 19:44

    There is some good stuff here regarding bit manipulation black magic: Advanced bit manipulation fu (Christer Ericson's blog)

    Don't know if any of it's directly applicable, but if there is a way, likely there are some hints to that way in there somewhere.

提交回复
热议问题