From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47008) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZJgYB-0000SP-6a for qemu-devel@nongnu.org; Mon, 27 Jul 2015 07:26:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZJgYA-0003Jr-2Q for qemu-devel@nongnu.org; Mon, 27 Jul 2015 07:26:31 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57593) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZJgY9-0003Jc-OQ for qemu-devel@nongnu.org; Mon, 27 Jul 2015 07:26:29 -0400 References: <1437994568-7825-1-git-send-email-aurelien@aurel32.net> <1437994568-7825-6-git-send-email-aurelien@aurel32.net> From: Paolo Bonzini Message-ID: <55B61562.2030808@redhat.com> Date: Mon, 27 Jul 2015 13:26:26 +0200 MIME-Version: 1.0 In-Reply-To: <1437994568-7825-6-git-send-email-aurelien@aurel32.net> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v2 for-2.5 05/12] tcg/optimize: track const/copy status separately List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Aurelien Jarno , qemu-devel@nongnu.org Cc: Richard Henderson On 27/07/2015 12:56, Aurelien Jarno wrote: > temps[dst].next_copy =3D temps[src].next_copy; > temps[dst].prev_copy =3D src; > temps[temps[dst].next_copy].prev_copy =3D dst; > temps[src].next_copy =3D dst; This is: dst->next =3D src->next; dst->prev =3D src; dst->next->prev =3D dst; src->next =3D dst; which seems weird. I think it should be one of /* splice src after dst */ dst->next->prev =3D src->prev; src->prev->next =3D dst->next; dst->next =3D src; src->prev =3D dst; or /* splice src before dst */ last =3D src->prev; dst->prev->next =3D src; src->prev =3D dst->prev; last->next =3D dst; dst->prev =3D last; (written as pointer manipulations for clarity). Maybe I'm missing the obvious, but if it's a problem it's better to fix it before the links are used more pervasively. Paolo