SHARE
TWEET

Untitled

a guest Apr 23rd, 2019 141 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,%rdx
  7.     and $0x5555555555555555, %rax
  8.     and $0xAAAAAAAAAAAAAAAA, %rdx
  9.     shl $1, %rax
  10.     shr $1, %rdx
  11.     or %rdx, %rax
  12.     mov %rax, %rdx
  13.     and $0x3333333333333333, %rax
  14.     and $0xCCCCCCCCCCCCCCCC, %rdx
  15.     shl $2, %rax
  16.     shr $2, %rdx
  17.     or %rdx, %rax
  18.     mov %rax, %rdx
  19.     and $0x0F0F0F0F0F0F0F0F, %rax
  20.     and $0xF0F0F0F0F0F0F0F0, %rdx
  21.     shl $4, %rax
  22.     shr $4, %rdx
  23.     or %rdx, %rax
  24.     mov %rax, %rdx
  25.     and $0x00FF00FF00FF00FF, %rax
  26.     and $0xFF00FF00FF00FF00, %rdx
  27.     shl $8, %rax
  28.     shr $8, %rdx
  29.     or %rdx, %rax
  30.     mov %rax, %rdx
  31.     and $0x0000FFFF0000FFFF, %rax
  32.     and $0xFFFF0000FFFF0000, %rdx
  33.     shl $16, %rax
  34.     shr $16, %rdx
  35.     or %rdx, %rax
  36.     mov %rax, %rdx
  37.     and $0x00000000FFFFFFFF, %rax
  38.     and $0xFFFFFFFF00000000, %rdx
  39.     shl $32, %rax
  40.     shr $32, %rdx
  41.     or %rdx, %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
 
Top