Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1F7mIf-0002gt-Hy for qemu-devel@nongnu.org; Fri, 10 Feb 2006 23:23:57 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1F7mIe-0002gh-0K for qemu-devel@nongnu.org; Fri, 10 Feb 2006 23:23:57 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1F7mId-0002ge-SP for qemu-devel@nongnu.org; Fri, 10 Feb 2006 23:23:55 -0500 Received: from [69.9.180.118] (helo=mail.squishy.cc) by monty-python.gnu.org with esmtp (Exim 4.52) id 1F7mMY-0002CA-PX for qemu-devel@nongnu.org; Fri, 10 Feb 2006 23:27:58 -0500 Date: Fri, 10 Feb 2006 20:23:53 -0800 (PST) From: Jurij Smakov In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Subject: [Qemu-devel] Re: Some patches for qemu on sparc Reply-To: jurij@wooyd.org, qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Blue Swirl Cc: qemu-devel@nongnu.org On Wed, 8 Feb 2006, Blue Swirl wrote: > Hi, > > The last problem means that gcc decided to make a leaf function, where > save/restore is not needed. The register use is not standard, but that > shouldn't matter, because the op functions do not take arguments or return a > value. > > Standard code, parsed by dyngen: > save > do stuff > ret > restore > > leaf code: > do stuff > retl > nop > > The solution should be to add code to dyngen.c to detect leaf functions which > suppresses the save/restore checks. Thanks for your feedback. I've added additional check to dyngen.c, which checks that function has either save; in the beginning and ret; restore; in the end, or ends in retl; nop;. That allowed me to get past the arm target build failure. Now it fails (during dyngen check) on ppc target, the culprit is the following function: 000033d8 : 33d8: 9c 03 bf 90 add %sp, -112, %sp 33dc: d1 19 a0 f8 ldd [ %g6 + 0xf8 ], %f8 33e0: 91 a0 18 c8 fdtos %f8, %f8 33e4: d1 23 a0 64 st %f8, [ %sp + 0x64 ] 33e8: c8 03 a0 64 ld [ %sp + 0x64 ], %g4 33ec: 99 39 20 18 sra %g4, 0x18, %o4 33f0: 97 39 20 10 sra %g4, 0x10, %o3 33f4: 95 39 20 08 sra %g4, 8, %o2 33f8: c8 28 60 03 stb %g4, [ %g1 + 3 ] 33fc: d8 28 40 00 stb %o4, [ %g1 ] 3400: d6 28 60 01 stb %o3, [ %g1 + 1 ] 3404: d4 28 60 02 stb %o2, [ %g1 + 2 ] 3408: 81 c3 e0 08 retl 340c: 9c 23 bf 90 sub %sp, -112, %sp What should dyngen do about a function like that? Best regards, Jurij Smakov jurij@wooyd.org Key: http://www.wooyd.org/pgpkey/ KeyID: C99E03CC