From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KQYqH-000669-2i for qemu-devel@nongnu.org; Tue, 05 Aug 2008 22:33:37 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KQYqF-00065H-5c for qemu-devel@nongnu.org; Tue, 05 Aug 2008 22:33:36 -0400 Received: from [199.232.76.173] (port=36256 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KQYqF-00065E-3K for qemu-devel@nongnu.org; Tue, 05 Aug 2008 22:33:35 -0400 Received: from csl.cornell.edu ([128.84.224.10]:3993 helo=vlsi.csl.cornell.edu) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KQYqF-0001ai-5T for qemu-devel@nongnu.org; Tue, 05 Aug 2008 22:33:35 -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 m762XTXk049182 for ; Tue, 5 Aug 2008 22:33:34 -0400 (EDT) Date: Tue, 5 Aug 2008 22:33:29 -0400 (EDT) From: Vince Weaver Subject: Re: [Qemu-devel] another SPARC issue In-Reply-To: <761ea48b0808051336o120c3e9j286d9523a693f98f@mail.gmail.com> Message-ID: <20080805223132.C58183@stanley.csl.cornell.edu> References: <20080728225136.C26546@stanley.csl.cornell.edu> <20080805161615.S57426@stanley.csl.cornell.edu> <761ea48b0808051336o120c3e9j286d9523a693f98f@mail.gmail.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed 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 > I am not sure I followed the right path, but it seems that indeed > for asi ld/st the constant gets added twice: once in the disas > function and once in gen_get_asi. I agree. The following patch to gen_get_asi() seems to fix things for me, the bzip executable I am using gets much further along with this patch applied (still not working 100% though). >>From what I can tell from the sparcv9 manual this patch is correct, but I might be missing something. --- translate.c.org 2008-08-05 22:30:15.000000000 -0400 +++ translate.c 2008-08-05 22:30:26.000000000 -0400 @@ -1641,13 +1641,11 @@ #ifdef TARGET_SPARC64 static inline TCGv gen_get_asi(int insn, TCGv r_addr) { - int asi, offset; + int asi; TCGv r_asi; if (IS_IMM) { r_asi = tcg_temp_new(TCG_TYPE_I32); - offset = GET_FIELD(insn, 25, 31); - tcg_gen_addi_tl(r_addr, r_addr, offset); tcg_gen_ld_i32(r_asi, cpu_env, offsetof(CPUSPARCState, asi)); } else { asi = GET_FIELD(insn, 19, 26);