Received: from [140.186.70.92] (port=37458 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OMHO1-0003DK-92 for qemu-devel@nongnu.org; Wed, 09 Jun 2010 05:15:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OMHO0-0003io-2q for qemu-devel@nongnu.org; Wed, 09 Jun 2010 05:15:49 -0400 Received: from adelie.canonical.com ([91.189.90.139]:37551) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OMHNz-0003if-Tt for qemu-devel@nongnu.org; Wed, 09 Jun 2010 05:15:48 -0400 Received: from loganberry.canonical.com ([91.189.90.37]) by adelie.canonical.com with esmtp (Exim 4.69 #1 (Debian)) id 1OMHNv-0000fa-5D for ; Wed, 09 Jun 2010 10:15:43 +0100 Received: from loganberry.canonical.com (localhost [127.0.0.1]) by loganberry.canonical.com (Postfix) with ESMTP id 2BEED2E8009 for ; Wed, 9 Jun 2010 10:15:39 +0100 (BST) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Date: Wed, 09 Jun 2010 09:04:43 -0000 From: cmchao Sender: bounces@canonical.com References: <20100608154638.9142.36364.malonedeb@soybean.canonical.com> Message-Id: <20100609090443.9096.94211.malone@soybean.canonical.com> Errors-To: bounces@canonical.com Subject: [Qemu-devel] [Bug 591320] Re: [ARM]: SIMD add/sub instructions are incorrect Reply-To: Bug 591320 <591320@bugs.launchpad.net> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org The first one results from wrong saturation judgment. The original form is : uint8_t sub8_usat(uint8_t a, uint8_t b) { if (a < b) return a - b; else return 0; } it should be " a > b" The second problem is using op2 as op1 to tell among signed, unsigned, and = half group ** Patch added: "For case 2" http://launchpadlibrarian.net/50000603/0001-target-arm-fix-thumb2-parall= el-add-sub-opcode-decodi.patch -- = [ARM]: SIMD add/sub instructions are incorrect https://bugs.launchpad.net/bugs/591320 You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. Status in QEMU: New Bug description: The thumb2 and unsigned arm state SIMD add/sub instructions are implemented= incorrectly, for example: UQSUB8 r0, r1, r0 gives r0 as 0, where r0 is 0x12345678 and r1 is 0x23456789 in ARM state, a= nd: UHSUB8 r0, r1, r0 gives r0 as 0x1111be01, where r0 is 0x12345678 and r1 is 0x23456789 in thum= b2 state. This problem is present in git HEAD, (at time of writing, fd1dc858370d9a9ac= 7ea2512812c3a152ee6484b).