[PATCH 4/5] aarch64: camellia: Only use the lower 32 bit of an int parameter

Martin Storsjö martin at martin.st
Thu Mar 22 22:32:39 CET 2018


* cipher/camellia-aarch64.S: Use 'w3' instead of 'x3'.
--
The keybits parameter is declared as int, and in those cases, the
upper half of a register is undefined, not guaranteed to be zero.

Signed-off-by: Martin Storsjö <martin at martin.st>
---
 cipher/camellia-aarch64.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cipher/camellia-aarch64.S b/cipher/camellia-aarch64.S
index 440f69f..68d2a7d 100644
--- a/cipher/camellia-aarch64.S
+++ b/cipher/camellia-aarch64.S
@@ -33,7 +33,7 @@
 #define CTX x0
 #define RDST x1
 #define RSRC x2
-#define RKEYBITS x3
+#define RKEYBITS w3
 
 #define RTAB1 x4
 #define RTAB2 x5
-- 
2.7.4




More information about the Gcrypt-devel mailing list