Commit 38e73b3d authored by Ard Biesheuvel's avatar Ard Biesheuvel Committed by Herbert Xu

crypto: arm/aes-neonbs - replace tweak mask literal with composition

Replace the vector load from memory sequence with a simple instruction
sequence to compose the tweak vector directly.
Signed-off-by: default avatarArd Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent e53b43d8
...@@ -887,10 +887,6 @@ ENDPROC(aesbs_ctr_encrypt) ...@@ -887,10 +887,6 @@ ENDPROC(aesbs_ctr_encrypt)
veor \out, \out, \tmp veor \out, \out, \tmp
.endm .endm
.align 4
.Lxts_mul_x:
.quad 1, 0x87
/* /*
* aesbs_xts_encrypt(u8 out[], u8 const in[], u8 const rk[], int rounds, * aesbs_xts_encrypt(u8 out[], u8 const in[], u8 const rk[], int rounds,
* int blocks, u8 iv[]) * int blocks, u8 iv[])
...@@ -899,7 +895,9 @@ ENDPROC(aesbs_ctr_encrypt) ...@@ -899,7 +895,9 @@ ENDPROC(aesbs_ctr_encrypt)
*/ */
__xts_prepare8: __xts_prepare8:
vld1.8 {q14}, [r7] // load iv vld1.8 {q14}, [r7] // load iv
__ldr q15, .Lxts_mul_x // load tweak mask vmov.i32 d30, #0x87 // compose tweak mask vector
vmovl.u32 q15, d30
vshr.u64 d30, d31, #7
vmov q12, q14 vmov q12, q14
__adr ip, 0f __adr ip, 0f
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment