Re: Large File support and blocks.

From: Andi Kleen (ak@suse.de)
Date: Fri Sep 01 2000 - 09:15:27 EDT

  • Next message: Richard Gooch: "Re: [PATCH] mtrr: s/suser/capable/"

    On Fri, Sep 01, 2000 at 04:01:43PM +0300, Matti Aarnio wrote:
    > On Fri, Sep 01, 2000 at 02:44:04PM +0200, Andi Kleen wrote:
    > > > To my knowlege it's only been speed related issues, not
    > > > correctness issues, that have been the cause for the
    > > > fear and loathing of long long.
    > >
    > > There are several parts of XFS which do not compile correctly with gcc
    > > 2.95.2, but do with egcs 1.1
    > >
    > > For example consider the appended test case. It breaks with 2.95-stable
    > > (from CVS March or so) because the bh->b_blocknr >>= block_bits;
    > > shift is miscompiled. The problem seems to be that it forgets to reload
    > > the %cl register used for the variable shift after the long long shift
    > > before, leading to a bogus shift.
    >
    > And mind you, that shift operates on 'unsigned long' !
    > ( Not 'unsigned long long' )

    The shift on pbm_offset operates on long long.

    The previous analysis was not quite right though (%cl is actually loaded,
    just %eax gets bogus input from the long long shift)

    >
    > So far there has been only talk of doing the change. Brr...
    >
    > > Another problem is that linus' do_div in asm-i386/div64.h seems to cause
    > > miscompiled code when used in anything more complicated than printk (no
    > > extracted test case yet sorry)
    >
    > It really isn't intended for anything else.
    > It is rather terrible side-effect monster..

    So what do you propose to use when a long long division is needed (after
    much thought and considering all alternatives etc.etc.) ?

    -Andi

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



    This archive was generated by hypermail 2b29 : Fri Sep 01 2000 - 09:17:40 EDT