Skip to content

Commit

Permalink
Update x25519-asm-arm.S to compile with Apple's armv7-apple-ios toolc…
Browse files Browse the repository at this point in the history
…hain.

I agree to license my contributions to each file under the terms given
at the top of each file I changed.
  • Loading branch information
kali authored and briansmith committed Jan 25, 2017
1 parent 68c262c commit 6215cef
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions crypto/curve25519/asm/x25519-asm-arm.S
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,25 @@
#if !defined(OPENSSL_NO_ASM)
#if defined(__arm__)

#if !defined(__APPLE__)
.fpu neon
#endif
.text
.align 4

.global GFp_x25519_NEON

#if defined(__APPLE__)
.private_extern _GFp_x25519_NEON
#ifdef __thumb2__
.thumb_func _GFp_x25519_NEON
#endif
#else
.hidden GFp_x25519_NEON
.type GFp_x25519_NEON, %function
GFp_x25519_NEON:
#endif

_GFp_x25519_NEON:
vpush {q4,q5,q6,q7}
mov r12,sp
sub sp,sp,#736
Expand All @@ -42,8 +53,8 @@ mov r0,r0
mov r1,r1
mov r2,r2
add r3,sp,#32
ldr r4,=0
ldr r5,=254
mov r4, #0
mov r5, #254
vmov.i32 q0,#1
vshr.u64 q1,q0,#7
vshr.u64 q0,q0,#8
Expand All @@ -61,7 +72,7 @@ vst1.8 {d4-d5},[r6,: 128]!
vst1.8 {d4-d5},[r6,: 128]!
vst1.8 d4,[r6,: 64]
add r6,r3,#0
ldr r7,=960
mov r7, #960
sub r7,r7,#2
neg r7,r7
sub r7,r7,r7,LSL #7
Expand Down

0 comments on commit 6215cef

Please sign in to comment.