Consistently use named constants in ARM assembly files.

Most of the OPENSSL_armcap_P accesses in assembly use named constants from
arm_arch.h, but some don't. Consistently use the constants. The dispatch really
should be in C, but in the meantime, make it easier to tell what's going on.

I'll send this patch upstream so we won't be carrying a diff here.

Change-Id: I63c68d2351ea5ce11005813314988e32b6459526
Reviewed-by: Adam Langley <>
diff --git a/crypto/bn/asm/ b/crypto/bn/asm/
index afcbdf6..b751112 100644
--- a/crypto/bn/asm/
+++ b/crypto/bn/asm/
@@ -107,7 +107,7 @@
 #ifdef	__APPLE__
 	ldr	r0,[r0]
-	tst	r0,#1			@ NEON available?
+	tst	r0,#ARMV7_NEON		@ NEON available?
 	ldmia	sp, {r0,r2}
 	beq	.Lialu
 	add	sp,sp,#8
diff --git a/crypto/chacha/asm/ b/crypto/chacha/asm/
index 6c20755..4545101 100755
--- a/crypto/chacha/asm/
+++ b/crypto/chacha/asm/
@@ -214,7 +214,7 @@
 # ifdef	__APPLE__
 	ldr	r4,[r4]
 # endif
-	tst	r4,#1
+	tst	r4,#ARMV7_NEON
 	bne	.LChaCha20_neon
diff --git a/crypto/sha/asm/ b/crypto/sha/asm/
index cd3662a..15d50f2 100644
--- a/crypto/sha/asm/
+++ b/crypto/sha/asm/
@@ -291,7 +291,7 @@
 #ifdef	__APPLE__
 	ldr	r12,[r12]
-	tst	r12,#1
+	tst	r12,#ARMV7_NEON
 	bne	.LNEON
 	add	$len,$inp,$len,lsl#7	@ len to point at the end of inp