From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JXifr-0005g2-Px for qemu-devel@nongnu.org; Fri, 07 Mar 2008 14:56:11 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JXifo-0005eG-VY for qemu-devel@nongnu.org; Fri, 07 Mar 2008 14:56:11 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JXifo-0005dr-J0 for qemu-devel@nongnu.org; Fri, 07 Mar 2008 14:56:08 -0500 Received: from mtaout02-winn.ispmail.ntl.com ([81.103.221.48]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JXifj-0001KK-8q for qemu-devel@nongnu.org; Fri, 07 Mar 2008 14:56:08 -0500 Received: from aamtaout03-winn.ispmail.ntl.com ([81.103.221.35]) by mtaout02-winn.ispmail.ntl.com with ESMTP id <20080307195825.CPC27871.mtaout02-winn.ispmail.ntl.com@aamtaout03-winn.ispmail.ntl.com> for ; Fri, 7 Mar 2008 19:58:25 +0000 Received: from miranda.arrow ([213.107.26.151]) by aamtaout03-winn.ispmail.ntl.com with ESMTP id <20080307200059.EPLF26699.aamtaout03-winn.ispmail.ntl.com@miranda.arrow> for ; Fri, 7 Mar 2008 20:00:59 +0000 Received: from sdb by miranda.arrow with local (Exim 4.63) (envelope-from ) id 1JXiff-0007yi-NF for qemu-devel@nongnu.org; Fri, 07 Mar 2008 19:55:59 +0000 Date: Fri, 7 Mar 2008 19:55:59 +0000 From: Stuart Brady Subject: Re: [Qemu-devel] Questions/comments on TCG Message-ID: <20080307195559.GA30601@miranda.arrow> References: <20080307123710.GA29683@miranda.arrow> <20080307181942.GA30329@miranda.arrow> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 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. 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. Cheers, -- Stuart Brady