use AT&T syntax in fiat_p256_adx

Converted using 86a8bdcc10

Change-Id: Ic3b4f5b0f52a21eebd7c597a8caebf7b08c21fe3
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/68527
Reviewed-by: Andres Erbsen <andreser@google.com>
Reviewed-by: Adam Langley <agl@google.com>
Reviewed-by: David Benjamin <davidben@google.com>
Commit-Queue: Adam Langley <agl@google.com>
master
Andres Erbsen 6 months ago committed by David Benjamin
parent c70190368c
commit d477c0d7c4
  1. 279
      third_party/fiat/asm/fiat_p256_adx_mul.S
  2. 251
      third_party/fiat/asm/fiat_p256_adx_sqr.S

@ -3,7 +3,6 @@
#if !defined(OPENSSL_NO_ASM) && defined(OPENSSL_X86_64) && \ #if !defined(OPENSSL_NO_ASM) && defined(OPENSSL_X86_64) && \
(defined(__APPLE__) || defined(__ELF__)) (defined(__APPLE__) || defined(__ELF__))
.intel_syntax noprefix
.text .text
#if defined(__APPLE__) #if defined(__APPLE__)
.private_extern _fiat_p256_adx_mul .private_extern _fiat_p256_adx_mul
@ -18,158 +17,158 @@ fiat_p256_adx_mul:
.cfi_startproc .cfi_startproc
_CET_ENDBR _CET_ENDBR
push rbp pushq %rbp
.cfi_adjust_cfa_offset 8 ;.cfi_adjust_cfa_offset 8
.cfi_offset rbp, -16 .cfi_offset rbp, -16
mov rbp, rsp movq %rsp, %rbp
mov rax, rdx movq %rdx, %rax
mov rdx, [ rsi + 0x0 ] movq (%rsi), %rdx
test al, al testb %al, %al
mulx r8, rcx, [ rax + 0x0 ] mulxq (%rax), %rcx, %r8
mov [ rsp - 0x80 ], rbx movq %rbx, -0x80(%rsp)
.cfi_offset rbx, -16-0x80 .cfi_offset rbx, -16-0x80
mulx rbx, r9, [ rax + 0x8 ] mulxq 0x8(%rax), %r9, %rbx
mov [ rsp - 0x68 ], r14 movq %r14, -0x68(%rsp)
.cfi_offset r14, -16-0x68 .cfi_offset r14, -16-0x68
adc r9, r8 adcq %r8, %r9
mov [ rsp - 0x60 ], r15 movq %r15, -0x60(%rsp)
.cfi_offset r15, -16-0x60 .cfi_offset r15, -16-0x60
mulx r15, r14, [ rax + 0x10 ] mulxq 0x10(%rax), %r14, %r15
mov [ rsp - 0x78 ], r12 movq %r12, -0x78(%rsp)
.cfi_offset r12, -16-0x78 .cfi_offset r12, -16-0x78
adc r14, rbx adcq %rbx, %r14
mulx r11, r10, [ rax + 0x18 ] mulxq 0x18(%rax), %r10, %r11
mov [ rsp - 0x70 ], r13 movq %r13, -0x70(%rsp)
.cfi_offset r13, -16-0x70 .cfi_offset r13, -16-0x70
adc r10, r15 adcq %r15, %r10
mov rdx, [ rsi + 0x8 ] movq 0x8(%rsi), %rdx
mulx rbx, r8, [ rax + 0x0 ] mulxq (%rax), %r8, %rbx
adc r11, 0x0 adcq $0x0, %r11
xor r15, r15 xorq %r15, %r15
adcx r8, r9 adcxq %r9, %r8
adox rbx, r14 adoxq %r14, %rbx
mov [ rsp - 0x58 ], rdi movq %rdi, -0x58(%rsp)
mulx rdi, r9, [ rax + 0x8 ] mulxq 0x8(%rax), %r9, %rdi
adcx r9, rbx adcxq %rbx, %r9
adox rdi, r10 adoxq %r10, %rdi
mulx rbx, r14, [ rax + 0x10 ] mulxq 0x10(%rax), %r14, %rbx
adcx r14, rdi adcxq %rdi, %r14
adox rbx, r11 adoxq %r11, %rbx
mulx r13, r12, [ rax + 0x18 ] mulxq 0x18(%rax), %r12, %r13
adcx r12, rbx adcxq %rbx, %r12
mov rdx, 0x100000000 movq $0x100000000, %rdx
mulx r11, r10, rcx mulxq %rcx, %r10, %r11
adox r13, r15 adoxq %r15, %r13
adcx r13, r15 adcxq %r15, %r13
xor rdi, rdi xorq %rdi, %rdi
adox r10, r8 adoxq %r8, %r10
mulx r8, rbx, r10 mulxq %r10, %rbx, %r8
adox r11, r9 adoxq %r9, %r11
adcx rbx, r11 adcxq %r11, %rbx
adox r8, r14 adoxq %r14, %r8
mov rdx, 0xffffffff00000001 movq $0xffffffff00000001, %rdx
mulx r9, r15, rcx mulxq %rcx, %r15, %r9
adcx r15, r8 adcxq %r8, %r15
adox r9, r12 adoxq %r12, %r9
mulx r14, rcx, r10 mulxq %r10, %rcx, %r14
mov rdx, [ rsi + 0x10 ] movq 0x10(%rsi), %rdx
mulx r10, r12, [ rax + 0x8 ] mulxq 0x8(%rax), %r12, %r10
adcx rcx, r9 adcxq %r9, %rcx
adox r14, r13 adoxq %r13, %r14
mulx r11, r13, [ rax + 0x0 ] mulxq (%rax), %r13, %r11
mov r9, rdi movq %rdi, %r9
adcx r14, r9 adcxq %r9, %r14
adox rdi, rdi adoxq %rdi, %rdi
adc rdi, 0x0 adcq $0x0, %rdi
xor r9, r9 xorq %r9, %r9
adcx r13, rbx adcxq %rbx, %r13
adox r11, r15 adoxq %r15, %r11
mov rdx, [ rsi + 0x10 ] movq 0x10(%rsi), %rdx
mulx r15, r8, [ rax + 0x10 ] mulxq 0x10(%rax), %r8, %r15
adox r10, rcx adoxq %rcx, %r10
mulx rcx, rbx, [ rax + 0x18 ] mulxq 0x18(%rax), %rbx, %rcx
mov rdx, [ rsi + 0x18 ] movq 0x18(%rsi), %rdx
adcx r12, r11 adcxq %r11, %r12
mulx rsi, r11, [ rax + 0x8 ] mulxq 0x8(%rax), %r11, %rsi
adcx r8, r10 adcxq %r10, %r8
adox r15, r14 adoxq %r14, %r15
adcx rbx, r15 adcxq %r15, %rbx
adox rcx, r9 adoxq %r9, %rcx
adcx rcx, r9 adcxq %r9, %rcx
mulx r15, r10, [ rax + 0x0 ] mulxq (%rax), %r10, %r15
add rcx, rdi addq %rdi, %rcx
mov r14, r9 movq %r9, %r14
adc r14, 0 adcq $0x0, %r14
xor r9, r9 xorq %r9, %r9
adcx r10, r12 adcxq %r12, %r10
adox r15, r8 adoxq %r8, %r15
adcx r11, r15 adcxq %r15, %r11
adox rsi, rbx adoxq %rbx, %rsi
mulx r8, r12, [ rax + 0x10 ] mulxq 0x10(%rax), %r12, %r8
adox r8, rcx adoxq %rcx, %r8
mulx rcx, rbx, [ rax + 0x18 ] mulxq 0x18(%rax), %rbx, %rcx
adcx r12, rsi adcxq %rsi, %r12
adox rcx, r9 adoxq %r9, %rcx
mov rdx, 0x100000000 movq $0x100000000, %rdx
adcx rbx, r8 adcxq %r8, %rbx
adc rcx, 0 adcq $0x0, %rcx
mulx rdi, r15, r13 mulxq %r13, %r15, %rdi
xor rax, rax xorq %rax, %rax
adcx rcx, r14 adcxq %r14, %rcx
adc rax, 0 adcq $0x0, %rax
xor r9, r9 xorq %r9, %r9
adox r15, r10 adoxq %r10, %r15
mulx r14, r10, r15 mulxq %r15, %r10, %r14
adox rdi, r11 adoxq %r11, %rdi
mov rdx, 0xffffffff00000001 movq $0xffffffff00000001, %rdx
adox r14, r12 adoxq %r12, %r14
adcx r10, rdi adcxq %rdi, %r10
mulx r12, r11, r13 mulxq %r13, %r11, %r12
adcx r11, r14 adcxq %r14, %r11
adox r12, rbx adoxq %rbx, %r12
mulx rbx, r13, r15 mulxq %r15, %r13, %rbx
adcx r13, r12 adcxq %r12, %r13
adox rbx, rcx adoxq %rcx, %rbx
mov r8, r9 movq %r9, %r8
adox rax, r9 adoxq %r9, %rax
adcx r8, rbx adcxq %rbx, %r8
adc rax, 0x0 adcq $0x0, %rax
mov rcx, rax movq %rax, %rcx
mov r15, 0xffffffffffffffff movq $0xffffffffffffffff, %r15
mov rdi, r10 movq %r10, %rdi
sub rdi, r15 subq %r15, %rdi
mov r14, 0xffffffff movq $0xffffffff, %r14
mov r12, r11 movq %r11, %r12
sbb r12, r14 sbbq %r14, %r12
mov rbx, r13 movq %r13, %rbx
sbb rbx, r9 sbbq %r9, %rbx
mov rax, rax movq %rax, %rax
mov rax, r8 movq %r8, %rax
sbb rax, rdx sbbq %rdx, %rax
sbb rcx, r9 sbbq %r9, %rcx
cmovc rdi, r10 cmovcq %r10, %rdi
mov r10, [ rsp - 0x58 ] movq -0x58(%rsp), %r10
cmovc rbx, r13 cmovcq %r13, %rbx
mov r13, [ rsp - 0x70 ] movq -0x70(%rsp), %r13
.cfi_restore r13 .cfi_restore r13
cmovc r12, r11 cmovcq %r11, %r12
cmovc rax, r8 cmovcq %r8, %rax
mov [ r10 + 0x10 ], rbx movq %rbx, 0x10(%r10)
mov rbx, [ rsp - 0x80 ] movq -0x80(%rsp), %rbx
.cfi_restore rbx .cfi_restore rbx
mov [ r10 + 0x0 ], rdi movq %rdi, (%r10)
mov [ r10 + 0x8 ], r12 movq %r12, 0x8(%r10)
mov [ r10 + 0x18 ], rax movq %rax, 0x18(%r10)
mov r12, [ rsp - 0x78 ] movq -0x78(%rsp), %r12
.cfi_restore r12 .cfi_restore r12
mov r14, [ rsp - 0x68 ] movq -0x68(%rsp), %r14
.cfi_restore r14 .cfi_restore r14
mov r15, [ rsp - 0x60 ] movq -0x60(%rsp), %r15
.cfi_restore r15 .cfi_restore r15
pop rbp popq %rbp
.cfi_restore rbp .cfi_restore rbp
.cfi_adjust_cfa_offset -8 .cfi_adjust_cfa_offset -8
ret retq
.cfi_endproc .cfi_endproc
#if defined(__ELF__) #if defined(__ELF__)
.size fiat_p256_adx_mul, .-fiat_p256_adx_mul .size fiat_p256_adx_mul, .-fiat_p256_adx_mul

@ -3,7 +3,6 @@
#if !defined(OPENSSL_NO_ASM) && defined(OPENSSL_X86_64) && \ #if !defined(OPENSSL_NO_ASM) && defined(OPENSSL_X86_64) && \
(defined(__APPLE__) || defined(__ELF__)) (defined(__APPLE__) || defined(__ELF__))
.intel_syntax noprefix
.text .text
#if defined(__APPLE__) #if defined(__APPLE__)
.private_extern _fiat_p256_adx_sqr .private_extern _fiat_p256_adx_sqr
@ -18,147 +17,147 @@ fiat_p256_adx_sqr:
.cfi_startproc .cfi_startproc
_CET_ENDBR _CET_ENDBR
push rbp pushq %rbp
.cfi_adjust_cfa_offset 8 .cfi_adjust_cfa_offset 8
.cfi_offset rbp, -16 .cfi_offset rbp, -16
mov rbp, rsp movq %rsp, %rbp
mov rdx, [ rsi + 0x0 ] movq (%rsi), %rdx
mulx r10, rax, [ rsi + 0x18 ] mulxq 0x18(%rsi), %rax, %r10
mulx rcx, r11, rdx mulxq %rdx, %r11, %rcx
mulx r9, r8, [ rsi + 0x8 ] mulxq 0x8(%rsi), %r8, %r9
mov [ rsp - 0x80 ], rbx movq %rbx, -0x80(%rsp)
.cfi_offset rbx, -16-0x80 .cfi_offset rbx, -16-0x80
xor rbx, rbx xorq %rbx, %rbx
adox r8, r8 adoxq %r8, %r8
mov [ rsp - 0x78 ], r12 movq %r12, -0x78(%rsp)
.cfi_offset r12, -16-0x78 .cfi_offset r12, -16-0x78
mulx r12, rbx, [ rsi + 0x10 ] mulxq 0x10(%rsi), %rbx, %r12
mov rdx, [ rsi + 0x8 ] movq 0x8(%rsi), %rdx
mov [ rsp - 0x70 ], r13 movq %r13, -0x70(%rsp)
.cfi_offset r13, -16-0x70 .cfi_offset r13, -16-0x70
mov [ rsp - 0x68 ], r14 movq %r14, -0x68(%rsp)
.cfi_offset r14, -16-0x68 .cfi_offset r14, -16-0x68
mulx r14, r13, rdx mulxq %rdx, %r13, %r14
mov [ rsp - 0x60 ], r15 movq %r15, -0x60(%rsp)
.cfi_offset r15, -16-0x60 .cfi_offset r15, -16-0x60
mov [ rsp - 0x58 ], rdi movq %rdi, -0x58(%rsp)
mulx rdi, r15, [ rsi + 0x10 ] mulxq 0x10(%rsi), %r15, %rdi
adcx r12, r15 adcxq %r15, %r12
mov [ rsp - 0x50 ], r11 movq %r11, -0x50(%rsp)
mulx r11, r15, [ rsi + 0x18 ] mulxq 0x18(%rsi), %r15, %r11
adcx r10, rdi adcxq %rdi, %r10
mov rdi, 0x0 movq $0x0, %rdi
adcx r11, rdi adcxq %rdi, %r11
clc clc
adcx rbx, r9 adcxq %r9, %rbx
adox rbx, rbx adoxq %rbx, %rbx
adcx rax, r12 adcxq %r12, %rax
adox rax, rax adoxq %rax, %rax
adcx r15, r10 adcxq %r10, %r15
adox r15, r15 adoxq %r15, %r15
mov rdx, [ rsi + 0x10 ] movq 0x10(%rsi), %rdx
mulx r12, r9, [ rsi + 0x18 ] mulxq 0x18(%rsi), %r9, %r12
adcx r9, r11 adcxq %r11, %r9
adcx r12, rdi adcxq %rdi, %r12
mulx r11, r10, rdx mulxq %rdx, %r10, %r11
clc clc
adcx rcx, r8 adcxq %r8, %rcx
adcx r13, rbx adcxq %rbx, %r13
adcx r14, rax adcxq %rax, %r14
adox r9, r9 adoxq %r9, %r9
adcx r10, r15 adcxq %r15, %r10
mov rdx, [ rsi + 0x18 ] movq 0x18(%rsi), %rdx
mulx rbx, r8, rdx mulxq %rdx, %r8, %rbx
adox r12, r12 adoxq %r12, %r12
adcx r11, r9 adcxq %r9, %r11
mov rsi, [ rsp - 0x50 ] movq -0x50(%rsp), %rsi
adcx r8, r12 adcxq %r12, %r8
mov rax, 0x100000000 movq $0x100000000, %rax
mov rdx, rax movq %rax, %rdx
mulx r15, rax, rsi mulxq %rsi, %rax, %r15
adcx rbx, rdi adcxq %rdi, %rbx
adox rbx, rdi adoxq %rdi, %rbx
xor r9, r9 xorq %r9, %r9
adox rax, rcx adoxq %rcx, %rax
adox r15, r13 adoxq %r13, %r15
mulx rcx, rdi, rax mulxq %rax, %rdi, %rcx
adcx rdi, r15 adcxq %r15, %rdi
adox rcx, r14 adoxq %r14, %rcx
mov rdx, 0xffffffff00000001 movq $0xffffffff00000001, %rdx
mulx r14, r13, rsi mulxq %rsi, %r13, %r14
adox r14, r10 adoxq %r10, %r14
adcx r13, rcx adcxq %rcx, %r13
mulx r12, r10, rax mulxq %rax, %r10, %r12
adox r12, r11 adoxq %r11, %r12
mov r11, r9 movq %r9, %r11
adox r11, r8 adoxq %r8, %r11
adcx r10, r14 adcxq %r14, %r10
mov r8, r9 movq %r9, %r8
adcx r8, r12 adcxq %r12, %r8
mov rax, r9 movq %r9, %rax
adcx rax, r11 adcxq %r11, %rax
mov r15, r9 movq %r9, %r15
adox r15, rbx adoxq %rbx, %r15
mov rdx, 0x100000000 movq $0x100000000, %rdx
mulx rcx, rbx, rdi mulxq %rdi, %rbx, %rcx
mov r14, r9 movq %r9, %r14
adcx r14, r15 adcxq %r15, %r14
mov r12, r9 movq %r9, %r12
adox r12, r12 adoxq %r12, %r12
adcx r12, r9 adcxq %r9, %r12
adox rbx, r13 adoxq %r13, %rbx
mulx r11, r13, rbx mulxq %rbx, %r13, %r11
mov r15, 0xffffffff00000001 movq $0xffffffff00000001, %r15
mov rdx, r15 movq %r15, %rdx
mulx rsi, r15, rbx mulxq %rbx, %r15, %rsi
adox rcx, r10 adoxq %r10, %rcx
adox r11, r8 adoxq %r8, %r11
mulx r8, r10, rdi mulxq %rdi, %r10, %r8
adcx r13, rcx adcxq %rcx, %r13
adox r8, rax adoxq %rax, %r8
adcx r10, r11 adcxq %r11, %r10
adox rsi, r14 adoxq %r14, %rsi
mov rdi, r12 movq %r12, %rdi
mov rax, r9 movq %r9, %rax
adox rdi, rax adoxq %rax, %rdi
adcx r15, r8 adcxq %r8, %r15
mov r14, rax movq %rax, %r14
adcx r14, rsi adcxq %rsi, %r14
adcx rdi, r9 adcxq %r9, %rdi
dec r9 decq %r9
mov rbx, r13 movq %r13, %rbx
sub rbx, r9 subq %r9, %rbx
mov rcx, 0xffffffff movq $0xffffffff, %rcx
mov r11, r10 movq %r10, %r11
sbb r11, rcx sbbq %rcx, %r11
mov r8, r15 movq %r15, %r8
sbb r8, rax sbbq %rax, %r8
mov rsi, r14 movq %r14, %rsi
sbb rsi, rdx sbbq %rdx, %rsi
sbb rdi, rax sbbq %rax, %rdi
cmovc rbx, r13 cmovcq %r13, %rbx
cmovc r8, r15 cmovcq %r15, %r8
cmovc r11, r10 cmovcq %r10, %r11
cmovc rsi, r14 cmovcq %r14, %rsi
mov rdi, [ rsp - 0x58 ] movq -0x58(%rsp), %rdi
mov [ rdi + 0x18 ], rsi movq %rsi, 0x18(%rdi)
mov [ rdi + 0x0 ], rbx movq %rbx, (%rdi)
mov [ rdi + 0x8 ], r11 movq %r11, 0x8(%rdi)
mov [ rdi + 0x10 ], r8 movq %r8, 0x10(%rdi)
mov rbx, [ rsp - 0x80 ] movq -0x80(%rsp), %rbx
.cfi_restore rbx .cfi_restore rbx
mov r12, [ rsp - 0x78 ] movq -0x78(%rsp), %r12
.cfi_restore r12 .cfi_restore r12
mov r13, [ rsp - 0x70 ] movq -0x70(%rsp), %r13
.cfi_restore r13 .cfi_restore r13
mov r14, [ rsp - 0x68 ] movq -0x68(%rsp), %r14
.cfi_restore r14 .cfi_restore r14
mov r15, [ rsp - 0x60 ] movq -0x60(%rsp), %r15
.cfi_restore r15 .cfi_restore r15
pop rbp popq %rbp
.cfi_restore rbp .cfi_restore rbp
.cfi_adjust_cfa_offset -8 .cfi_adjust_cfa_offset -8
ret retq
.cfi_endproc .cfi_endproc
#if defined(__ELF__) #if defined(__ELF__)
.size fiat_p256_adx_sqr, .-fiat_p256_adx_sqr .size fiat_p256_adx_sqr, .-fiat_p256_adx_sqr

Loading…
Cancel
Save