aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArd Biesheuvel <ard.biesheuvel@linaro.org>2015-05-08 04:46:22 -0400
committerHerbert Xu <herbert@gondor.apana.org.au>2015-05-11 03:08:01 -0400
commit6499e8cfaa8f5d041b20af24d8409dec9f3ac3d0 (patch)
tree4a5b9fdec8e3932b44fc2ea0dd8d0e739630bb7c
parentc80ae7ca372606a3971dcdfa3420275cf17ef6b6 (diff)
crypto: arm/aes - streamline AES-192 code path
This trims off a couple of instructions of the total size of the core AES transform by reordering the final branch in the AES-192 code path with the rounds that are performed regardless of whether the branch is taken or not. Other than the slight size reduction, this has no performance benefit. Fix up a comment regarding the prototype of this function while we're at it. Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
-rw-r--r--arch/arm/crypto/aes-ce-core.S7
1 files changed, 3 insertions, 4 deletions
diff --git a/arch/arm/crypto/aes-ce-core.S b/arch/arm/crypto/aes-ce-core.S
index 8cfa468ee570..987aa632c9f0 100644
--- a/arch/arm/crypto/aes-ce-core.S
+++ b/arch/arm/crypto/aes-ce-core.S
@@ -101,15 +101,14 @@
101 \dround q10, q11 101 \dround q10, q11
102 blo 0f @ AES-128: 10 rounds 102 blo 0f @ AES-128: 10 rounds
103 vld1.8 {q10-q11}, [ip]! 103 vld1.8 {q10-q11}, [ip]!
104 beq 1f @ AES-192: 12 rounds
105 \dround q12, q13 104 \dround q12, q13
105 beq 1f @ AES-192: 12 rounds
106 vld1.8 {q12-q13}, [ip] 106 vld1.8 {q12-q13}, [ip]
107 \dround q10, q11 107 \dround q10, q11
1080: \fround q12, q13, q14 1080: \fround q12, q13, q14
109 bx lr 109 bx lr
110 110
1111: \dround q12, q13 1111: \fround q10, q11, q14
112 \fround q10, q11, q14
113 bx lr 112 bx lr
114 .endm 113 .endm
115 114
@@ -122,8 +121,8 @@
122 * q2 : third in/output block (_3x version only) 121 * q2 : third in/output block (_3x version only)
123 * q8 : first round key 122 * q8 : first round key
124 * q9 : secound round key 123 * q9 : secound round key
125 * ip : address of 3rd round key
126 * q14 : final round key 124 * q14 : final round key
125 * r2 : address of round key array
127 * r3 : number of rounds 126 * r3 : number of rounds
128 */ 127 */
129 .align 6 128 .align 6