Created
May 14, 2018 14:44
-
-
Save eira-fransham/5cb83c773e90fc7a463ccb58e1dad4e3 to your computer and use it in GitHub Desktop.
Disassembly of `U256::full_mul` when using `-C target-cpu=native`
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
libbigint.so`disassemble: | |
pushq %rbp | |
movq %rsp, %rbp | |
pushq %r15 | |
pushq %r14 | |
pushq %r13 | |
pushq %r12 | |
pushq %rbx | |
subq $0x50, %rsp | |
movq 0x10(%rbp), %r14 | |
movq 0x18(%rbp), %r11 | |
movq 0x30(%rbp), %rax | |
movq %rax, %rdx | |
mulxq %r14, %rcx, %r15 | |
movq %rcx, -0x78(%rbp) | |
movq 0x38(%rbp), %r10 | |
mulxq %r11, %rcx, %r8 | |
movq 0x20(%rbp), %rbx | |
mulxq %rbx, %rsi, %r9 | |
movq %rbx, %r13 | |
movq %r13, -0x40(%rbp) | |
addq %r15, %rcx | |
adcxq %r8, %rsi | |
pushq %rax | |
seto %al | |
lahf | |
movq %rax, %r8 | |
popq %rax | |
movq %r10, %rdx | |
mulxq %r14, %rbx, %rdx | |
addq %rcx, %rbx | |
movq %rbx, -0x70(%rbp) | |
adcxq %rdx, %rsi | |
pushq %rax | |
seto %al | |
lahf | |
movq %rax, %rcx | |
popq %rax | |
movq 0x28(%rbp), %rbx | |
movq %rbx, -0x60(%rbp) | |
movq %rax, %rdx | |
mulxq %rbx, %rax, %rdx | |
movq %rdx, -0x38(%rbp) | |
pushq %rax | |
movq %r8, %rax | |
addb $0x7f, %al | |
sahf | |
popq %rax | |
adcxq %r9, %rax | |
pushq %rax | |
seto %al | |
lahf | |
movq %rax, %rdx | |
popq %rax | |
movq %rdx, -0x58(%rbp) | |
movq %r10, %rdx | |
mulxq %r11, %rbx, %r12 | |
movq %r11, -0x50(%rbp) | |
xorl %edx, %edx | |
addq %rsi, %rbx | |
adcxq %rdx, %r12 | |
pushq %rax | |
movq %rcx, %rax | |
addb $0x7f, %al | |
sahf | |
popq %rax | |
adcxq %rdx, %r12 | |
setb %sil | |
addq %rax, %r12 | |
movq %r10, %rdx | |
mulxq %r13, %r15, %rax | |
movq %rax, -0x48(%rbp) | |
movq 0x40(%rbp), %r8 | |
movq %r8, %rdx | |
mulxq %r14, %rcx, %rdx | |
setb %al | |
addq %rbx, %rcx | |
movq %rcx, -0x68(%rbp) | |
leaq (%r15,%r12), %rbx | |
adcxq %rdx, %rbx | |
pushq %rax | |
seto %al | |
lahf | |
movq %rax, %rcx | |
popq %rax | |
movq %r8, %rdx | |
mulxq %r11, %r9, %r13 | |
addq %rbx, %r9 | |
movl $0x0, %edx | |
adcxq %rdx, %r13 | |
pushq %rax | |
movq %rcx, %rax | |
addb $0x7f, %al | |
sahf | |
popq %rax | |
adcxq %rdx, %r13 | |
setb -0x29(%rbp) | |
orb %sil, %al | |
addq %r15, %r12 | |
movzbl %al, %eax | |
adcxq -0x48(%rbp), %rax | |
setb %sil | |
movq -0x58(%rbp), %rcx | |
pushq %rax | |
movq %rcx, %rax | |
addb $0x7f, %al | |
sahf | |
popq %rax | |
adcxq -0x38(%rbp), %rax | |
movq %r10, %rdx | |
movq -0x60(%rbp), %r10 | |
mulxq %r10, %rbx, %rdx | |
setb %cl | |
orb %sil, %cl | |
addq %rax, %rbx | |
movzbl %cl, %esi | |
adcxq %rdx, %rsi | |
movq %r8, %rdx | |
mulxq -0x40(%rbp), %r12, %rax | |
movq %rax, -0x38(%rbp) | |
addq %r13, %rbx | |
movq 0x48(%rbp), %r15 | |
movq %r15, %rdx | |
mulxq %r14, %r11, %rdx | |
setb %cl | |
addq %r9, %r11 | |
leaq (%r12,%rbx), %rax | |
adcxq %rdx, %rax | |
pushq %rax | |
seto %al | |
lahf | |
movq %rax, %r13 | |
popq %rax | |
movq %r15, %rdx | |
mulxq -0x50(%rbp), %r9, %r14 | |
addq %rax, %r9 | |
movl $0x0, %eax | |
adcxq %rax, %r14 | |
pushq %rax | |
movq %r13, %rax | |
addb $0x7f, %al | |
sahf | |
popq %rax | |
adcxq %rax, %r14 | |
setb %al | |
orb -0x29(%rbp), %cl | |
addq %r12, %rbx | |
movzbl %cl, %ecx | |
adcxq -0x38(%rbp), %rcx | |
setb %dl | |
addq %rsi, %rcx | |
setb %bl | |
orb %dl, %bl | |
movq %r8, %rdx | |
mulxq %r10, %rsi, %rdx | |
addq %rcx, %rsi | |
movzbl %bl, %ecx | |
adcxq %rdx, %rcx | |
addq %r14, %rsi | |
setb %bl | |
orb %al, %bl | |
movq %r15, %rdx | |
mulxq -0x40(%rbp), %rax, %rdx | |
addq %rsi, %rax | |
movzbl %bl, %esi | |
adcxq %rdx, %rsi | |
setb %dl | |
addq %rcx, %rsi | |
setb %cl | |
orb %dl, %cl | |
movq %r15, %rdx | |
mulxq %r10, %rbx, %rdx | |
addq %rsi, %rbx | |
movzbl %cl, %ecx | |
adcxq %rdx, %rcx | |
movq -0x78(%rbp), %rdx | |
movq %rdx, (%rdi) | |
movq -0x70(%rbp), %rdx | |
movq %rdx, 0x8(%rdi) | |
movq -0x68(%rbp), %rdx | |
movq %rdx, 0x10(%rdi) | |
movq %r11, 0x18(%rdi) | |
movq %r9, 0x20(%rdi) | |
movq %rax, 0x28(%rdi) | |
movq %rbx, 0x30(%rdi) | |
movq %rcx, 0x38(%rdi) | |
movq %rdi, %rax | |
addq $0x50, %rsp | |
popq %rbx | |
popq %r12 | |
popq %r13 | |
popq %r14 | |
popq %r15 | |
popq %rbp | |
retq |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment