Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N0tJs-0002bY-9i for qemu-devel@nongnu.org; Thu, 22 Oct 2009 04:46:52 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N0tJn-0002Yk-Mh for qemu-devel@nongnu.org; Thu, 22 Oct 2009 04:46:51 -0400 Received: from [199.232.76.173] (port=58242 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N0tJn-0002YS-Fk for qemu-devel@nongnu.org; Thu, 22 Oct 2009 04:46:47 -0400 Received: from smtp.nokia.com ([192.100.122.233]:63136 helo=mgw-mx06.nokia.com) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1N0tJm-0002q5-Qt for qemu-devel@nongnu.org; Thu, 22 Oct 2009 04:46:47 -0400 From: Date: Thu, 22 Oct 2009 10:46:37 +0200 Subject: Re: [Qemu-devel] [PATCH 12/12] [RESEND] target-arm: fix neon shift helper functions Message-ID: References: <3B23632B-8EC3-4CED-9E73-C1EC7142C9C3@nokia.com> <761ea48b0910220057k285bf59crfd5e0f6136a3ca11@mail.gmail.com> In-Reply-To: <761ea48b0910220057k285bf59crfd5e0f6136a3ca11@mail.gmail.com> Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: laurent.desnogues@gmail.com Cc: qemu-devel@nongnu.org On Oct 22, 2009, at 10:57, ext Laurent Desnogues wrote: > On Wed, Oct 21, 2009 at 1:01 PM, wrote: >> Current code is broken at least on gcc 4.2, the result of a =20 >> comparison >> "-1 >=3D sizeof(type) * 8" results true and causes wrong code path to =20 >> be >> taken. The fix utilizes abs() function where applicable and otherwise >> adds a test to ensure both arguments are positive before making the >> aforementioned comparison. > > Why don't you instead cast sizeof to int? No reason, I'll make the v2 patch series use cast instead. It seems to =20 work just as well. Juha