From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50486) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VqAps-0004HV-SF for qemu-devel@nongnu.org; Mon, 09 Dec 2013 19:06:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VqApg-0003MI-Cj for qemu-devel@nongnu.org; Mon, 09 Dec 2013 19:06:00 -0500 Sender: Richard Henderson Message-ID: <52A65AD8.6000109@twiddle.net> Date: Mon, 09 Dec 2013 16:05:44 -0800 From: Richard Henderson MIME-Version: 1.0 References: <1386604035-2507-1-git-send-email-tommusta@gmail.com> <1386604035-2507-4-git-send-email-tommusta@gmail.com> In-Reply-To: <1386604035-2507-4-git-send-email-tommusta@gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 03/18] target-ppc: Add ISA2.06 divdeu[o] Instructions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Tom Musta , qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org On 12/09/2013 07:47 AM, Tom Musta wrote: > This patch adds the Divide Doubleword Extended Unsigned > instructions. This instruction requires dividing a 128-bit > value by a 64 bit value. Since 128 bit integer division is > not supported in TCG, a helper is used, providing a > repeated difference algorithm. It's long past time we provided this generically. There's a (slightly) better algorithm than this in target-i386/int_helper.c. Extra points for stealing the (much) better algorithm from gcc's libgcc2.c. This ought to go in "host-utils.h" next to mul[us]64. r~