Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Kdnf2-0001er-OM for qemu-devel@nongnu.org; Thu, 11 Sep 2008 11:00:44 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Kdnf2-0001eW-4X for qemu-devel@nongnu.org; Thu, 11 Sep 2008 11:00:44 -0400 Received: from [199.232.76.173] (port=35340 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kdnf1-0001eN-Uk for qemu-devel@nongnu.org; Thu, 11 Sep 2008 11:00:44 -0400 Received: from csl.cornell.edu ([128.84.224.10]:3909 helo=vlsi.csl.cornell.edu) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Kdnf1-0003yQ-Jq for qemu-devel@nongnu.org; Thu, 11 Sep 2008 11:00:43 -0400 Received: from stanley.csl.cornell.edu (stanley.csl.cornell.edu [128.84.224.15]) by vlsi.csl.cornell.edu (8.13.4/8.13.4) with ESMTP id m8BF0WIC023820 for ; Thu, 11 Sep 2008 11:00:37 -0400 (EDT) Date: Thu, 11 Sep 2008 11:00:32 -0400 (EDT) From: Vince Weaver Message-ID: <20080911105538.B37531@stanley.csl.cornell.edu> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Subject: [Qemu-devel] sparc y register 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 I'm wasting a lot of time trying to get the sixtrack spec2k benchmark going. (It crashes 30 minutes into the program, deep in a long FORTRAN program). One of the problems eventually traces back to a routine reading long floating point numbers from a text file. In any case, part of the problem is that the write y instruction is writing a 64-bit value, but from what I can tell in the documentation the top 32-bits of y should always be zero. What this means is sometimes in sparc32plus mode, we write a register to y that has some of the higher 32 bits set, which causes later mulscc instructions to get the wrong results. The patch below seems to fix this particular problem (and a test case I have that exhibits it) but it seems as if there's still another bug at work somewhere because sixtrack still won't run. Vince Index: target-sparc/translate.c =================================================================== --- target-sparc/translate.c (revision 5193) +++ target-sparc/translate.c (working copy) @@ -3196,6 +3196,7 @@ switch(rd) { case 0: /* wry */ tcg_gen_xor_tl(cpu_y, cpu_src1, cpu_src2); + tcg_gen_andi_tl(cpu_y,cpu_y,0xffffffff); break; #ifndef TARGET_SPARC64 case 0x01 ... 0x0f: /* undefined in the