diff mbox series

[3/3] crypto: x86/twofish-3way - Remove unused macro argument

Message ID 39dcdd3216a4163e43cb922892047c86a2a6abef.1675653010.git.peter@n8pjl.ca
State New
Headers show
Series crypto: x86/twofish-3way - Cleanup and optimize asm | expand

Commit Message

Peter Lafreniere Feb. 6, 2023, 3:31 a.m. UTC
The outunpack3() macro has an op parameter that is only ever called with
"mov". Removing that argument altogether leads to gains to code
readability. There is no effect on the resulting binary.

Signed-off-by: Peter Lafreniere <peter@n8pjl.ca>
---
 arch/x86/crypto/twofish-x86_64-asm_64-3way.S | 24 ++++++++++----------
 1 file changed, 12 insertions(+), 12 deletions(-)
diff mbox series

Patch

diff --git a/arch/x86/crypto/twofish-x86_64-asm_64-3way.S b/arch/x86/crypto/twofish-x86_64-asm_64-3way.S
index 29e0fe664386..c2cd9b5406da 100644
--- a/arch/x86/crypto/twofish-x86_64-asm_64-3way.S
+++ b/arch/x86/crypto/twofish-x86_64-asm_64-3way.S
@@ -182,23 +182,23 @@ 
 	movq 4*(8+(n))(in),		xy ## 2; \
 	xorq w+4*m(CTX),		xy ## 2;
 
-#define outunpack3(op, out, n, xy, m) \
+#define outunpack3(out, n, xy, m) \
 	xorq w+4*m(CTX),		xy ## 0; \
-	op ## q xy ## 0,		4*(n)(out); \
+	movq xy ## 0,			4*(n)(out); \
 	\
 	xorq w+4*m(CTX),		xy ## 1; \
-	op ## q xy ## 1,		4*(4+(n))(out); \
+	movq xy ## 1,			4*(4+(n))(out); \
 	\
 	xorq w+4*m(CTX),		xy ## 2; \
-	op ## q xy ## 2,		4*(8+(n))(out);
+	movq xy ## 2,			4*(8+(n))(out);
 
 #define inpack_enc3() \
 	inpack3(RIO, 0, RAB, 0); \
 	inpack3(RIO, 2, RCD, 2);
 
-#define outunpack_enc3(op) \
-	outunpack3(op, RIO, 2, RAB, 6); \
-	outunpack3(op, RIO, 0, RCD, 4);
+#define outunpack_enc3() \
+	outunpack3(RIO, 2, RAB, 6); \
+	outunpack3(RIO, 0, RCD, 4);
 
 #define inpack_dec3() \
 	inpack3(RIO, 0, RAB, 4); \
@@ -214,11 +214,11 @@ 
 	rorq $32,			RCD0; \
 	rorq $32,			RCD1; \
 	rorq $32,			RCD2; \
-	outunpack3(mov, RIO, 0, RCD, 0); \
+	outunpack3(RIO, 0, RCD, 0); \
 	rorq $32,			RAB0; \
 	rorq $32,			RAB1; \
 	rorq $32,			RAB2; \
-	outunpack3(mov, RIO, 2, RAB, 2);
+	outunpack3(RIO, 2, RAB, 2);
 
 #define outunpack_cbc_dec3() \
 	rorq $32,			RCD0; \
@@ -226,13 +226,13 @@ 
 	xorq (RT1),			RCD1; \
 	rorq $32,			RCD2; \
 	xorq 16(RT1),			RCD2; \
-	outunpack3(mov, RIO, 0, RCD, 0); \
+	outunpack3(RIO, 0, RCD, 0); \
 	rorq $32,			RAB0; \
 	rorq $32,			RAB1; \
 	xorq 8(RT1),			RAB1; \
 	rorq $32,			RAB2; \
 	xorq 24(RT1),			RAB2; \
-	outunpack3(mov, RIO, 2, RAB, 2);
+	outunpack3(RIO, 2, RAB, 2);
 
 SYM_FUNC_START(twofish_enc_blk_3way)
 	/* input:
@@ -261,7 +261,7 @@  SYM_FUNC_START(twofish_enc_blk_3way)
 
 	popq RIO; /* dst */
 
-	outunpack_enc3(mov);
+	outunpack_enc3();
 
 	popq %rbx;
 	popq %r12;