From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KeGmQ-0000vJ-1z for qemu-devel@nongnu.org; Fri, 12 Sep 2008 18:06:18 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KeGmO-0000sQ-Ip for qemu-devel@nongnu.org; Fri, 12 Sep 2008 18:06:17 -0400 Received: from [199.232.76.173] (port=50020 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KeGmO-0000sF-GM for qemu-devel@nongnu.org; Fri, 12 Sep 2008 18:06:16 -0400 Received: from mail-gx0-f19.google.com ([209.85.217.19]:51545) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KeGmN-0004Ui-Sm for qemu-devel@nongnu.org; Fri, 12 Sep 2008 18:06:16 -0400 Received: by gxk12 with SMTP id 12so20113824gxk.10 for ; Fri, 12 Sep 2008 15:06:14 -0700 (PDT) Message-ID: <12d7e64c0809121506u5e90c121vfda353321c227c9d@mail.gmail.com> Date: Sat, 13 Sep 2008 01:06:14 +0300 From: "Zeev Tarantov" MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: [Qemu-devel] [PATCH] 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! In GCC 4.3.1 I get syntax errors building test-i386.c with any optimization level higher than -O0. I assume this does not happen with GCC 3.X. The following patch fixes the problem. I believe that it is more correct and not just a quirk of gcc. After applying this, the tests produce expected results (and pass). If this is a double post, I apologize - I have tried sending this using gmane without being subscribed to the list. --- tests/test-i386.c (revision 5200) +++ 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