|
From: | Alberto Garcia |
Subject: | Re: [Qemu-devel] [PATCH v2 5/8] crypto: convert xts_mult_x to use xts_uint128 type |
Date: | Tue, 16 Oct 2018 16:22:12 +0200 |
User-agent: | Notmuch/0.18.2 (http://notmuchmail.org) Emacs/24.4.1 (i586-pc-linux-gnu) |
On Tue 16 Oct 2018 03:59:27 PM CEST, Daniel P. Berrangé wrote: > In fact I could do the following: > > @@ -59,12 +59,13 @@ static void xts_mult_x(xts_uint128 *I) > xts_uint128_cpu_to_les(I); > > tt = I->u[0] >> 63; > - I->u[0] = I->u[0] << 1; > + I->u[0] <<= 1; > > if (I->u[1] >> 63) { > I->u[0] ^= 0x87; > } > - I->u[1] = (I->u[1] << 1) | tt; > + I->u[1] <<= 1; > + I->u[1] |= tt; > > xts_uint128_le_to_cpus(I); > } Yep, that looks good. Berto
[Prev in Thread] | Current Thread | [Next in Thread] |