Closed yuyang-ok closed 2 years ago
You can use the Zbb rev8
from instruction to swap the bytes and then use shifts, ands, and ors to reverse the bits within each byte. https://godbolt.org/z/5onMsrq7r
Or you can use rev8
and brev8
from Zbkb to reverse bytes and bits within bytes. https://godbolt.org/z/5zh6dbjM7
ok,thanks you.
or there is a cheap way to implement bit reverse? current now I only can do this using iteration.