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~