Skip to content
This repository has been archived by the owner on Jan 15, 2021. It is now read-only.

Commit

Permalink
deps: Update openssl asm files.
Browse files Browse the repository at this point in the history
  • Loading branch information
ZepHakase authored and enricogior committed Aug 20, 2016
1 parent 4f289ae commit 66639d3
Show file tree
Hide file tree
Showing 11 changed files with 1,920 additions and 571 deletions.
22 changes: 11 additions & 11 deletions deps/openssl/asm/arm-elf-gas/bn/armv4-gf2m.S
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
mul_1x1_neon:
vshl.u64 d2,d16,#8 @ q1-q3 are slided

vmull.p8 q0,d16,d17 @ a·bb
vmull.p8 q0,d16,d17 @ a·bb
vshl.u64 d4,d16,#16
vmull.p8 q1,d2,d17 @ a<<8·bb
vmull.p8 q1,d2,d17 @ a<<8·bb
vshl.u64 d6,d16,#24
vmull.p8 q2,d4,d17 @ a<<16·bb
vmull.p8 q2,d4,d17 @ a<<16·bb
vshr.u64 d2,#8
vmull.p8 q3,d6,d17 @ a<<24·bb
vmull.p8 q3,d6,d17 @ a<<24·bb
vshl.u64 d3,#24
veor d0,d2
vshr.u64 d4,#16
Expand Down Expand Up @@ -132,20 +132,20 @@ bn_GF2m_mul_2x2:

vmov d16,d18
vmov d17,d19
bl mul_1x1_neon @ a1·b1
bl mul_1x1_neon @ a1·b1
vmov d22,d0

vmov d16,d20
vmov d17,d21
bl mul_1x1_neon @ a0·b0
bl mul_1x1_neon @ a0·b0
vmov d23,d0

veor d16,d20,d18
veor d17,d21,d19
veor d20,d23,d22
bl mul_1x1_neon @ (a0+a1)·(b0+b1)
bl mul_1x1_neon @ (a0+a1)·(b0+b1)

veor d0,d20 @ (a0+a1)·(b0+b1)-a0·b0-a1·b1
veor d0,d20 @ (a0+a1)·(b0+b1)-a0·b0-a1·b1
vshl.u64 d1,d0,#32
vshr.u64 d0,d0,#32
veor d23,d1
Expand All @@ -165,7 +165,7 @@ bn_GF2m_mul_2x2:
mov r12,#7<<2
sub sp,sp,#32 @ allocate tab[8]

bl mul_1x1_ialu @ a1·b1
bl mul_1x1_ialu @ a1·b1
str r5,[r10,#8]
str r4,[r10,#12]

Expand All @@ -175,13 +175,13 @@ bn_GF2m_mul_2x2:
eor r2,r2,r1
eor r0,r0,r3
eor r1,r1,r2
bl mul_1x1_ialu @ a0·b0
bl mul_1x1_ialu @ a0·b0
str r5,[r10]
str r4,[r10,#4]

eor r1,r1,r2
eor r0,r0,r3
bl mul_1x1_ialu @ (a1+a0)·(b1+b0)
bl mul_1x1_ialu @ (a1+a0)·(b1+b0)
ldmia r10,{r6-r9}
eor r5,r5,r4
eor r4,r4,r7
Expand Down
6 changes: 3 additions & 3 deletions deps/openssl/asm/arm-elf-gas/modes/ghash-armv4.S
Original file line number Diff line number Diff line change
Expand Up @@ -368,8 +368,8 @@ gcm_ghash_neon:
vdup.8 d4,d28[0] @ broadcast lowest byte
.Linner_neon:
subs r1,r1,#1
vmull.p8 q9,d1,d4 @ H.lo·Xi[i]
vmull.p8 q8,d0,d4 @ H.hi·Xi[i]
vmull.p8 q9,d1,d4 @ H.lo·Xi[i]
vmull.p8 q8,d0,d4 @ H.hi·Xi[i]
vext.8 q14,q12,#1 @ IN>>=8

veor q10,q13 @ modulo-scheduled part
Expand All @@ -382,7 +382,7 @@ gcm_ghash_neon:
vsli.8 d2,d3,#1 @ compose the "carry" byte
vext.8 q10,q12,#1 @ Z>>=8

vmull.p8 q11,d2,d5 @ "carry"·0xe1
vmull.p8 q11,d2,d5 @ "carry"·0xe1
vshr.u8 d2,d3,#7 @ save Z's bottom bit
vext.8 q13,q9,q12,#1 @ Qlo>>=8
veor q10,q8
Expand Down
43 changes: 40 additions & 3 deletions deps/openssl/asm/x64-elf-gas/bn/x86_64-mont.s
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,21 @@ bn_mul_mont:

movq %r11,8(%rsp,%r9,8)
.Lmul_body:






subq %rsp,%r11
andq $-4096,%r11
.Lmul_page_walk:
movq (%rsp,%r11,1),%r10
subq $4096,%r11
.byte 0x66,0x2e

jnc .Lmul_page_walk

movq %rdx,%r12
movq (%r8),%r8
movq (%r12),%rbx
Expand Down Expand Up @@ -228,6 +243,15 @@ bn_mul4x_mont:

movq %r11,8(%rsp,%r9,8)
.Lmul4x_body:
subq %rsp,%r11
andq $-4096,%r11
.Lmul4x_page_walk:
movq (%rsp,%r11,1),%r10
subq $4096,%r11
.byte 0x2e

jnc .Lmul4x_page_walk

movq %rdi,16(%rsp,%r9,8)
movq %rdx,%r12
movq (%r8),%r8
Expand Down Expand Up @@ -610,6 +634,7 @@ bn_mul4x_mont:
.align 16
bn_sqr4x_mont:
.Lsqr4x_enter:
movq %rsp,%rax
pushq %rbx
pushq %rbp
pushq %r12
Expand All @@ -618,13 +643,25 @@ bn_sqr4x_mont:
pushq %r15

shll $3,%r9d
xorq %r10,%r10
movq %rsp,%r11
subq %r9,%r10
negq %r9
movq (%r8),%r8
leaq -72(%rsp,%r10,2),%rsp
leaq -72(%rsp,%r9,2),%rsp
andq $-1024,%rsp

subq %rsp,%r11
andq $-4096,%r11
.Lsqr4x_page_walk:
movq (%rsp,%r11,1),%r10
subq $4096,%r11
.byte 0x2e

jnc .Lsqr4x_page_walk

movq %r9,%r10
negq %r9
leaq -48(%rax),%r11




Expand Down
Loading

0 comments on commit 66639d3

Please sign in to comment.