[RFC v5 57/57] arm64: crypto: Remove redundant branch

Julien Thierry jthierry at redhat.com
Thu Jan 9 08:03:00 PST 2020


Having a unconditional branch between the macros do_cond_yield_neon and
endif_yeild_neon causes the endif_yeild_neon to be unreachable. It so
happens that endif_yeild_neon expands to a branch and already allows to
provide the label to jump to after the yeild.

Get rid of the redundant branch instruction.

Signed-off-by: Julien Thierry <jthierry at redhat.com>
---
 arch/arm64/crypto/sha1-ce-core.S   | 3 +--
 arch/arm64/crypto/sha2-ce-core.S   | 3 +--
 arch/arm64/crypto/sha3-ce-core.S   | 3 +--
 arch/arm64/crypto/sha512-ce-core.S | 3 +--
 4 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/arch/arm64/crypto/sha1-ce-core.S b/arch/arm64/crypto/sha1-ce-core.S
index c2ce1f820706..50ca9d11a61f 100644
--- a/arch/arm64/crypto/sha1-ce-core.S
+++ b/arch/arm64/crypto/sha1-ce-core.S
@@ -132,8 +132,7 @@ CPU_LE(	rev32		v11.16b, v11.16b	)
 	st1		{dgav.4s}, [x19]
 	str		dgb, [x19, #16]
 	do_cond_yield_neon
-	b		0b
-	endif_yield_neon
+	endif_yield_neon 0b
 
 	b		1b
 
diff --git a/arch/arm64/crypto/sha2-ce-core.S b/arch/arm64/crypto/sha2-ce-core.S
index 6f728a419009..c64716f5de19 100644
--- a/arch/arm64/crypto/sha2-ce-core.S
+++ b/arch/arm64/crypto/sha2-ce-core.S
@@ -139,8 +139,7 @@ CPU_LE(	rev32		v19.16b, v19.16b	)
 	if_will_cond_yield_neon
 	st1		{dgav.4s, dgbv.4s}, [x19]
 	do_cond_yield_neon
-	b		0b
-	endif_yield_neon
+	endif_yield_neon 0b
 
 	b		1b
 
diff --git a/arch/arm64/crypto/sha3-ce-core.S b/arch/arm64/crypto/sha3-ce-core.S
index a7d587fa54f6..2448d8dec0de 100644
--- a/arch/arm64/crypto/sha3-ce-core.S
+++ b/arch/arm64/crypto/sha3-ce-core.S
@@ -203,8 +203,7 @@ ENTRY(sha3_ce_transform)
 	st1	{v20.1d-v23.1d}, [x8], #32
 	st1	{v24.1d}, [x8]
 	do_cond_yield_neon
-	b		0b
-	endif_yield_neon
+	endif_yield_neon 0b
 
 	b	1b
 
diff --git a/arch/arm64/crypto/sha512-ce-core.S b/arch/arm64/crypto/sha512-ce-core.S
index ce65e3abe4f2..703724703f8f 100644
--- a/arch/arm64/crypto/sha512-ce-core.S
+++ b/arch/arm64/crypto/sha512-ce-core.S
@@ -207,8 +207,7 @@ CPU_LE(	rev64		v19.16b, v19.16b	)
 	if_will_cond_yield_neon
 	st1		{v8.2d-v11.2d}, [x19]
 	do_cond_yield_neon
-	b		0b
-	endif_yield_neon
+	endif_yield_neon 0b
 
 	b		1b
 
-- 
2.21.0




More information about the linux-arm-kernel mailing list