SHARE
TWEET

Untitled

a guest May 19th, 2019 77 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     .text
  2.     .global add_bignum
  3.     .type   add_bignum, @function
  4. add_bignum:
  5.  
  6.     mov %rdx,%r11
  7.     xor %r13,%r13
  8.  
  9.     xor %r9,%r9
  10.     xor %r10,%r10
  11.  
  12.     mov (%rdi),%ecx
  13.     mov (%rsi),%ebx
  14.    
  15.     add $4,%rdi
  16.     add $4,%rsi
  17.     add $4,%rdx
  18.    
  19.     cmp %rcx,%rbx
  20.    
  21.     ja wieksze_rsi
  22.    
  23. wieksze_rdi:
  24.  
  25.     and %rcx,%rcx
  26.     jz koniec
  27.    
  28.     and %rbx,%rbx
  29.     jz nie_dodawaj2
  30.    
  31.     mov (%rsi),%r10b
  32.     add %r10,%r9
  33.     sub $1,%rbx
  34.    
  35. nie_dodawaj2:
  36.    
  37.     mov (%rdi),%r10b
  38.     add %r10,%r9
  39.     sub $1,%rcx
  40.    
  41.     mov %r9b,(%rdx)
  42.     shr $8,%r9
  43.    
  44.     add $1,%rdi
  45.     add $1,%rsi
  46.     add $1,%rdx
  47.    
  48.     add $1,%r13
  49.    
  50.     jmp wieksze_rdi    
  51.    
  52.  
  53. wieksze_rsi:
  54.  
  55.     and %rbx,%rbx
  56.     jz koniec
  57.    
  58.     and %rcx,%rcx
  59.     jz nie_dodawaj1
  60.    
  61.     mov (%rdi),%r10b
  62.     add %r10,%r9
  63.     sub $1,%rcx
  64.    
  65. nie_dodawaj1:
  66.    
  67.     mov (%rsi),%r10b
  68.     add %r10,%r9
  69.     sub $1,%rbx
  70.    
  71.     mov %r9b,(%rdx)
  72.     shr $8,%r9
  73.    
  74.     add $1,%rdi
  75.     add $1,%rsi
  76.     add $1,%rdx
  77.    
  78.     add $1,%r13
  79.    
  80.     jmp wieksze_rsi
  81.    
  82. koniec:  
  83.    
  84.    and %r9,%r9
  85.    jz nie_dodawaj3
  86.    
  87.    mov %r9b,(%rdx)
  88.    add $1,%r13
  89.    
  90. nie_dodawaj3:
  91.  
  92.     mov %r13d,(%r11)
  93.  
  94.     ret
  95.  
  96.     .size   add_bignum, . - add_bignum
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