From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.20) id 19aX2q-0002oR-1r for qemu-devel@nongnu.org; Thu, 10 Jul 2003 04:44:52 -0400 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.20) id 19aX2A-0001wm-Ku for qemu-devel@nongnu.org; Thu, 10 Jul 2003 04:44:13 -0400 Received: from smtp8.wanadoo.fr ([193.252.22.30] helo=mwinf0104.wanadoo.fr) by monty-python.gnu.org with esmtp (Exim 4.20) id 19aX1Z-000106-Rw for qemu-devel@nongnu.org; Thu, 10 Jul 2003 04:43:33 -0400 Received: from free.fr (unknown [81.49.237.20]) by mwinf0104.wanadoo.fr (SMTP Server) with ESMTP id 9AAE81BFFFB4 for ; Thu, 10 Jul 2003 10:43:32 +0200 (CEST) Message-ID: <3F0D2762.20301@free.fr> Date: Thu, 10 Jul 2003 10:44:18 +0200 From: Fabrice Bellard MIME-Version: 1.0 Subject: Re: [Qemu-devel] ARM References: <20030709183518.GA24671@nevyn.them.org> <1057780432.10296.72.camel@jma1.dev.netgem.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Jocelyn Mayer wrote: > On Wed, 2003-07-09 at 20:35, Daniel Jacobowitz wrote: > >> I was just playing with the ARM support, it's great to see it >> taking shape :) Fabrice, are you still investigating it, or does >> it work for you? My local ARM setup crashes a few hundred >> instructions into ld.so; a loop runs for too long and hits the top >> of the stack. > > > Hello, > > Maybe a flag problem.. As I was looking the overflow flag > calculation, while trying to fix it in my PPC emulation, I noticed > that this flag should be masked with (1 << 31) to be correct. Fabrice, > could you confirm this point ? Yes, the overflow flag should be masked with (1 << 31). For ARM, the masking does not need to be done as the overflow is computed in a separate variable. > It seems to work well in my PPC code... > > It may also comes from the fact that the qemu Elf loader builds a "buggy" > stack. I don't known anything about the ABI for the ARM, but I noticed > that the stack wasn't aligned properly on PPC and that some informations > were missing, but I don't really know if those infos are vital or > not. Even in x86 emulation, the stack is really different from the > one built by the Linux kernel (I compared with a linux-2.4.21 > kernel). I fixed some crashes, changing this code to do the same as > the kernel, but dynamic x86 loading is now buggy with that patch... Yes, alignment is not done properly yet as the elf loader comes from a very old Linux kernel. If you except the alignment bug, none of the differences should be critical. Fabrice.