Re: [PATCH] 498+ days uptime

Jamie Lokier (lkd@tantalophile.demon.co.uk)
Thu, 27 Aug 1998 01:19:22 +0100


On Wed, Aug 26, 1998 at 07:37:34AM +0000, H. Peter Anvin wrote:
> Actually, on x86 64-bit arithmetric is quite cheap, because x86 with
> its 8-bit CPU heritage has explicit support for multiword arithmetric
> (adc, sbb, 64-bit mul/imul/div/idiv).

Yes, the real problem is GCC's poor support. In particular, it treats
every 64-bit operation as a single operation, and can only allocate
certain combinations of registers to hold the 64-bit value. In some
cases the compiler crashes because it can't find enough registers.

Ideally it would break up the sequences into separate 32-bit operations,
and let those be subject to independent register/memory allocation,
scheduling, data flow etc.

Actually I dabbled with a generic pass to split DImode ops into SImode
ops for a while. It was quite an easy pass to write, but I moved on to
other things before fixing all the bugs and seeing if the results were
worth the effort.

-- Jamie

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html