Re: [RFC][PATCH] first cut 64 bit block support

From: Chris Wedgwood (
Date: Wed Jul 04 2001 - 05:16:58 EST

On Sun, Jul 01, 2001 at 12:53:25AM -0400, Ben LaHaise wrote:

> Ugly bits: I had to add libgcc.a to satisfy the need for 64 bit
> division. Yeah, it sucks, but RAID needs some more massaging before
> I can remove the 64 bit division completely. This will be fixed.

I would rather see this code removed from libgcc and put into a
function (optionally inline) such that code like:

__u64 foo(__u64 a, __u64 b)
        __u64 t;

        t = a * SOME_CONST + b;

        return t / BLEM;

would really look like:

__64 foo(__u64 a, __u64 b)
        __u64 t;

        t = 64b_mul(a, SOME_CONST) + b;

        return 64b_udiv(t, BLEM);

such that for peopel to use 64-bit operations on the kernel, they have
to explicity code them in, not just accidentialyl change a variable
type and have gcc/libgcc hide this fact from them.

Note, I use __u64 not "long long" as I'm not 100% "long long" will
mean 64-bits on all future architectures (it would be cool, for
example, if it was 128-bit on some!).

What do you think? Would you accept patches for either of these?

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Sat Jul 07 2001 - 21:00:13 EST