Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .section .rodata
- pnt_fmt_long:
- .string "%llx%016llx\n"
- pnt_fmt:
- .string "%llx\n"
- .text
- .global mul64p
- mul64p:
- pushl %ebp
- movl %esp, %ebp
- /*movl 8(%ebp), %eax /* a2
- movl 12(%ebp), %eax /* a1
- movl 16(%ebp), %eax /* b2
- movl 20(%ebp), %eax /* b1 */
- movl 8(%ebp), %eax
- mull 16(%ebp)
- movl %eax, -4(%ebp)
- movl %edx, -8(%ebp)
- movl $0, -12(%ebp)
- movl $0, -16(%ebp)
- movl 12(%ebp), %eax
- mull 16(%ebp)
- addl %eax, -8(%ebp)
- adcl %edx, -12(%ebp)
- movl 8(%ebp), %eax
- mull 20(%ebp)
- addl %eax, -8(%ebp)
- adcl %edx, -12(%ebp)
- adcl $0, -16(%ebp)
- movl 12(%ebp), %eax
- mull 20(%ebp)
- addl %eax, -12(%ebp)
- adcl %edx, -16(%ebp)
- cmpl $0, -16(%ebp)
- jnz long_print
- cmpl $0, -12(%ebp)
- jnz long_print
- movl -4(%ebp), %eax
- movl %eax, -16(%ebp)
- movl -8(%ebp), %eax
- movl %eax, -12(%ebp)
- subl $16, %esp
- pushl $pnt_fmt
- call printf
- addl $20, %esp
- popl %ebp
- ret
- long_print:
- subl $16, %esp
- movl -12(%ebp), %eax
- movl -16(%ebp), %edx
- movl %eax, -16(%ebp)
- movl %edx, -12(%ebp)
- movl -4(%ebp), %eax
- movl -8(%ebp), %edx
- movl %eax, -8(%ebp)
- movl %edx, -4(%ebp)
- pushl $pnt_fmt_long
- call printf
- addl $20, %esp
- popl %ebp
- ret
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement