SHARE
TWEET

Untitled

a guest Apr 24th, 2019 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     .text
  2.     .global bitrev
  3.     .type   bitrev, @function
  4. bitrev:
  5.     mov %rdi,%rax
  6.     mov %rdi,%rbx
  7.     and $0x5555555555555555,%rax
  8.     shl $1,%rax
  9.     and $0xAAAAAAAAAAAAAAAA,%rbx
  10.     shr $1,%rbx
  11.     or %rbx, %rax
  12.     mov %rax, %rbx
  13.     and $0x3333333333333333,%rax
  14.     shl $2,%rax
  15.     and $0xCCCCCCCCCCCCCCCC,%rbx
  16.     shr $2,%rbx
  17.     or %rbx, %rax
  18.     mov %rax, %rbx
  19.     and $0x0F0F0F0F0F0F0F0F,%rax
  20.     shl $4,%rax
  21.     and $0xF0F0F0F0F0F0F0F0,%rbx
  22.     shr $4,%rbx
  23.     or %rbx, %rax
  24.     mov %rax, %rbx
  25.     and $0x00FF00FF00FF00FF,%rax
  26.     shl $8,%rax
  27.     and $0xFF00FF00FF00FF00,%rbx
  28.     shr $8,%rbx
  29.     or %rbx, %rax
  30.     mov %rax, %rbx
  31.     and $0x0000FFFF0000FFFF,%rax
  32.     shl $16,%rax
  33.     and $0xFFFF0000FFFF0000,%rbx
  34.     shr $16,%rbx
  35.     or %rbx, %rax
  36.     mov %rax, %rbx
  37.     and $0x00000000FFFFFFFF,%rax
  38.     shl $32,%rax
  39.     and $0xFFFFFFFF00000000,%rbx
  40.     shr $32,%rbx
  41.     or %rbx, %rax
  42.     ret
  43.  
  44.     .size   bitrev, .-bitrev
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top