From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1K5r4d-00022b-3J for qemu-devel@nongnu.org; Mon, 09 Jun 2008 19:46:51 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1K5r4c-000226-7G for qemu-devel@nongnu.org; Mon, 09 Jun 2008 19:46:50 -0400 Received: from [199.232.76.173] (port=43382 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K5r4c-000220-3s for qemu-devel@nongnu.org; Mon, 09 Jun 2008 19:46:50 -0400 Received: from fe01x03-cgp.akado.ru ([77.232.31.164]:55600 helo=akado.ru) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1K5r4b-0002xC-HO for qemu-devel@nongnu.org; Mon, 09 Jun 2008 19:46:49 -0400 Date: Tue, 10 Jun 2008 03:47:03 +0400 (MSD) From: malc Subject: Re: [Qemu-devel] [4705] Fix div[u]2. In-Reply-To: <484D90AD.2020500@bellard.org> Message-ID: References: <484CEAFD.9020906@bellard.org> <484D90AD.2020500@bellard.org> 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: Fabrice Bellard Cc: qemu-devel@nongnu.org On Mon, 9 Jun 2008, Fabrice Bellard wrote: > malc wrote: >> On Mon, 9 Jun 2008, Fabrice Bellard wrote: >> >>> malc wrote: >>>> Revision: 4705 >>>> http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=4705 >>>> Author: malc >>>> Date: 2008-06-09 06:06:25 +0000 (Mon, 09 Jun 2008) >>>> >>>> Log Message: >>>> ----------- >>>> Fix div[u]2. >>>> >>>> Previous code assummed 32 by 32 bit divmod operation, and survived >>>> x86_64 test only by sheer luck. MIPS wasn't so forgiving. >>> >>> Are you sure it is needed ? div[u]2 support in currently optional in >>> TCG. On some hosts such as PowerPC, implementing div[u] directly is >>> simpler. rem[u] can be implemented generically then. >> >> When i added TCG_TARGET_HAS_div_i32 plus all that is necessary to handle >> div[u]/rem[u]_i32 tcg started to abort at tcg.c:1180 (at least for >> arm-softmmu) > > So this is the bug to solve. Adding divu2 is not necessary, at least > until we decided it is necessary for all TCG targets. Sorry i messed up with dependencies, everything is working with TCG_TARGET_HAS_div_i32. It's worth noting that PPC is the only TCG target that uses it though. -- mailto:av1474@comtv.ru