On Wed, Oct 16, 2013 at 06:06:29PM -0700, Christoffer Dall wrote: > On Mon, Oct 14, 2013 at 06:23:33PM +0200, Andrew Jones wrote: > > arm can't do arbitrary divisions without software support. Usually > > libgcc would jump in here, but depending on the toolchain used that may > > or may not work. Luckily, we only care about two types of divisions. > > Divide by 10 and divide by 16. Divide by 16 is already covered by gcc > > since it's a power of two. Divide by 10 can be hacked up using a > > multiplication and shift. > > Isn't this just a matter of supplying a few libc implementations to > handle div_by_0 and that sort? I'm pretty sure we had that working in > the kvm-selftest for ARM thingy that allowed you to use the standard '/' > operator in C code.... I suspect there will be more users of this > eventually. > > Or wait, do you mean 'long long' operations by arbitrary? In that case, > I'm less sure... A library implementation to support the operator would > still be preferred IMHO. No, that's not what I meant, nor can I pretend that's what I meant now :-) I saw that you had brought lib1funcs.S into kvm-selftest, but I'm not sure why I rejected doing the same thing... Probably because my reflex was to not adopt a bunch of assembler that I didn't want to maintain. But I guess there's nothing to maintain there. It works, and will always work. I'll switch to using it. drew -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html