crypto: arm/aes-ce - replace tweak mask literal with composition
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Tue, 3 Sep 2019 16:43:26 +0000 (09:43 -0700)
committerHerbert Xu <herbert@gondor.apana.org.au>
Mon, 9 Sep 2019 07:35:28 +0000 (17:35 +1000)
Replace the vector load from memory sequence with a simple instruction
sequence to compose the tweak vector directly.

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
arch/arm/crypto/aes-ce-core.S

index a3ca4ac2d7bbb1c8eb5d604d767657ed832520fb..bb6ec1844370486abeb9d6344acd520d42dabb16 100644 (file)
@@ -382,13 +382,10 @@ ENDPROC(ce_aes_ctr_encrypt)
        veor            \out, \out, \tmp
        .endm
 
-       .align          3
-.Lxts_mul_x:
-       .quad           1, 0x87
-
 ce_aes_xts_init:
-       vldr            d30, .Lxts_mul_x
-       vldr            d31, .Lxts_mul_x + 8
+       vmov.i32        d30, #0x87              @ compose tweak mask vector
+       vmovl.u32       q15, d30
+       vshr.u64        d30, d31, #7
 
        ldrd            r4, r5, [sp, #16]       @ load args
        ldr             r6, [sp, #28]