Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .text
- .global add_bignum
- .type add_bignum, @function
- add_bignum:
- mov %rdx,%r11
- xor %r13,%r13
- xor %r9,%r9
- xor %r10,%r10
- mov (%rdi),%ecx
- mov (%rsi),%ebx
- add $4,%rdi
- add $4,%rsi
- add $4,%rdx
- cmp %rcx,%rbx
- ja wieksze_rsi
- wieksze_rdi:
- and %rcx,%rcx
- jz koniec
- and %rbx,%rbx
- jz nie_dodawaj2
- mov (%rsi),%r10b
- add %r10,%r9
- sub $1,%rbx
- nie_dodawaj2:
- mov (%rdi),%r10b
- add %r10,%r9
- sub $1,%rcx
- mov %r9b,(%rdx)
- shr $8,%r9
- add $1,%rdi
- add $1,%rsi
- add $1,%rdx
- add $1,%r13
- jmp wieksze_rdi
- wieksze_rsi:
- and %rbx,%rbx
- jz koniec
- and %rcx,%rcx
- jz nie_dodawaj1
- mov (%rdi),%r10b
- add %r10,%r9
- sub $1,%rcx
- nie_dodawaj1:
- mov (%rsi),%r10b
- add %r10,%r9
- sub $1,%rbx
- mov %r9b,(%rdx)
- shr $8,%r9
- add $1,%rdi
- add $1,%rsi
- add $1,%rdx
- add $1,%r13
- jmp wieksze_rsi
- koniec:
- and %r9,%r9
- jz nie_dodawaj3
- mov %r9b,(%rdx)
- add $1,%r13
- nie_dodawaj3:
- mov %r13d,(%r11)
- ret
- .size add_bignum, . - add_bignum
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement