Re: Large File support and blocks.

From: Matti Aarnio (matti.aarnio@zmailer.org)
Date: Fri Sep 01 2000 - 08:01:43 EST


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' )

        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..

> Assembly from gcc 2.95 for the
> bh->b_blocknr = (long)mp->pbm_bn +
> (mp->pbm_offset >> inode->i_sb->s_blocksize_bits);
> bh->b_blocknr >>= block_bits;
> bh->b_state |= (1UL << 4 );

/Matti Aarnio
-
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 : Thu Sep 07 2000 - 21:00:11 EST