From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KeBX8-0005C5-8Z for qemu-devel@nongnu.org; Fri, 12 Sep 2008 12:30:10 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KeBX7-0005Bp-OQ for qemu-devel@nongnu.org; Fri, 12 Sep 2008 12:30:09 -0400 Received: from [199.232.76.173] (port=49845 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KeBX7-0005Bj-Ee for qemu-devel@nongnu.org; Fri, 12 Sep 2008 12:30:09 -0400 Received: from main.gmane.org ([80.91.229.2]:58637 helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KeBX7-0003Nj-Jx for qemu-devel@nongnu.org; Fri, 12 Sep 2008 12:30:09 -0400 Received: from root by ciao.gmane.org with local (Exim 4.43) id 1KeBX1-0003ji-Ar for qemu-devel@nongnu.org; Fri, 12 Sep 2008 16:30:03 +0000 Received: from 77.125.88.45 ([77.125.88.45]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 12 Sep 2008 16:30:03 +0000 Received: from zeev.tarantov by 77.125.88.45 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 12 Sep 2008 16:30:03 +0000 From: Zeev Tarantov Date: Fri, 12 Sep 2008 16:24:49 +0000 (UTC) Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: news Subject: [Qemu-devel] fix for TEST_BSX in test-i386.c Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Hello! On GCC 4.3.1 with any optimization level higher than -O0, I get syntax errors for test_bsx() in test-i386.c. The following patch fixes the problem and tests pass. I assume gcc-3.3 didn't have any problems with this code, but I believe my patch is objectively correct. --- tests/test-i386.c (revision 5199) +++ tests/test-i386.c (working copy) @@ -716,8 +716,8 @@ asm("xor %1, %1\n"\ "mov $0x12345678, %0\n"\ #op " %" size "2, %" size "0 ; setz %b1" \ - : "=r" (res), "=q" (resz)\ - : "g" (val));\ + : "=&r" (res), "=&q" (resz)\ + : "r" (val));\ printf("%-10s A=" FMTLX " R=" FMTLX " %ld\n", #op, val, res, resz);\ } -Zeev