From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JXjDb-0000pz-6Y for qemu-devel@nongnu.org; Fri, 07 Mar 2008 15:31:03 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JXjDZ-0000pC-Gb for qemu-devel@nongnu.org; Fri, 07 Mar 2008 15:31:02 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JXjDZ-0000p2-29 for qemu-devel@nongnu.org; Fri, 07 Mar 2008 15:31:01 -0500 Received: from mu-out-0910.google.com ([209.85.134.188]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JXjDY-00021c-LM for qemu-devel@nongnu.org; Fri, 07 Mar 2008 15:31:00 -0500 Received: by mu-out-0910.google.com with SMTP id w8so820773mue.4 for ; Fri, 07 Mar 2008 12:30:59 -0800 (PST) Message-ID: Date: Fri, 7 Mar 2008 22:30:58 +0200 From: "Blue Swirl" Subject: Re: [Qemu-devel] Questions/comments on TCG In-Reply-To: <20080307195559.GA30601@miranda.arrow> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20080307123710.GA29683@miranda.arrow> <20080307181942.GA30329@miranda.arrow> <20080307195559.GA30601@miranda.arrow> 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 On 3/7/08, Stuart Brady wrote: > On Fri, Mar 07, 2008 at 08:47:03PM +0200, Blue Swirl wrote: > > On 3/7/08, Stuart Brady wrote: > > > > tcg_target_reg_alloc_order[] has 32 elements, but only 14 are used. > > > The rest hold 0, specifying TCG_REG_G0. > > > > I see. That could be asking for trouble. > > > Possibly not, as g0 is marked as reserved, but it looks to me like bug, > regardless of whether it causes any harm, so I've submitted a patch. > > > > > I don't understand -- o7 is required when returning in exit_tb, so if it > > > is used, it must be saved and restored. > > > > Not exit_tb, but call. > > > Right, op_call does need to link, and that clobbers the link register, > so it must be restored -- but I've a feeling that this isn't happening. > I expect you could copy o7 to/from i5 before/after the call (or jmpl)... > although I'm not sure if you'd also need to save the frame pointer. Another possibility is to add function epilogue with save and add restore to ret (or use v9 return). > op_exit_tb also needs the link register, as it needs to know where to > return to. I see you've fixed op_goto_tb -- I'm not sure if TCG_REG_I5 > now needs removing from tcg_target_reg_alloc_order[], though. Good point, better remove it.