xfs
[Top] [All Lists]

Re: xfs_vnodeops.c compile problem/question

To: "Andi Kleen" <ak@xxxxxxx>
Subject: Re: xfs_vnodeops.c compile problem/question
From: "Andi Kleen" <ak@xxxxxxx>
Date: Wed, 9 Aug 2000 18:33:09 +0200
Cc: Steve Lord <lord@xxxxxxx>, linux-xfs@xxxxxxxxxxx
In-reply-to: <20000809172520.A28134@gruyere.muc.suse.de>; from ak@suse.de on Wed, Aug 09, 2000 at 05:25:20PM +0200
References: <200008091500.KAA09752@jen.americas.sgi.com> <20000809171957.A27797@gruyere.muc.suse.de> <20000809172520.A28134@gruyere.muc.suse.de>
Sender: owner-linux-xfs@xxxxxxxxxxx
On Wed, Aug 09, 2000 at 05:25:20PM +0200, Andi Kleen wrote:
> > compiler.   
> 
> Indeed this patch makes it compile. I haven't tested if it runs correctly.

[...]

The patch was wrong of course. Here is a better patch that is not obviously
incorrect, but the assembly output seems to be still wrong. I unfortunately
don't have time to investigate further right now.


-Andi


Index: include/asm-i386/div64.h
===================================================================
RCS file: /cvs/linux-2.4-xfs/linux/include/asm-i386/div64.h,v
retrieving revision 1.1
diff -u -r1.1 div64.h
--- include/asm-i386/div64.h    1999/11/12 18:56:11     1.1
+++ include/asm-i386/div64.h    2000/08/09 16:19:42
@@ -3,13 +3,13 @@
 
 #define do_div(n,base) ({ \
        unsigned long __upper, __low, __high, __mod; \
-       asm("":"=a" (__low), "=d" (__high):"A" (n)); \
+       __high = n>>32; __low = (__u32)n; \
        __upper = __high; \
        if (__high) { \
                __upper = __high % (base); \
                __high = __high / (base); \
        } \
-       asm("divl %2":"=a" (__low), "=d" (__mod):"rm" (base), "0" (__low), "1" 
(__upper)); \
+       volatile asm("divl %2":"=a" (__low), "=d" (__mod):"rm" (base), "0" 
(__low), "1" (__upper)); \
        asm("":"=A" (n):"a" (__low),"d" (__high)); \
        __mod; \
 })

<Prev in Thread] Current Thread [Next in Thread>