1 As of today's "fix up gcc 3.3 bits" patch [1], x86 math emulation
2 is now even more broken, since this latest patch has added some
3 mismatched quotes while still failing to address the actual
4 problems preventing this code from compiling with gcc 3.3.
6 This patch, first sent to you on Jun 21st, fixes the missing
7 semicolons and missing quotes in the x86 math-emu code, allowing
8 it to compile with gcc 3.3. I have updated things to also fix
9 the mismatched quotes that were added today. Unlike the patch
10 you applied earlier today, my patch is actually tested...
16 [1] http://www.kernel.org/diff/diffview.cgi?file=/pub/linux/kernel/v2.4/testing/cset/cset-alan@lxorguk.ukuu.org.uk|ChangeSet|20030701183359|14011.txt
19 Erik B. Andersen http://codepoet-consulting.com/
20 --This message was written using 73% post-consumer electrons--
23 --- linux/arch/i386/math-emu/poly.h.orig 2003-07-01 20:39:49.000000000 -0600
24 +++ linux/arch/i386/math-emu/poly.h 2003-07-01 20:39:57.000000000 -0600
26 const unsigned long arg2)
29 - asm volatile ("mull %2; movl %%edx,%%eax" \
30 + asm volatile ("mull %2; movl %%edx,%%eax; " \
32 :"0" (arg1), "g" (arg2) \
35 /* Add the 12 byte Xsig x2 to Xsig dest, with no checks for overflow. */
36 static inline void add_Xsig_Xsig(Xsig *dest, const Xsig *x2)
38 - asm volatile ("movl %1,%%edi; movl %2,%%esi;
39 - movl (%%esi),%%eax; addl %%eax,(%%edi);
40 - movl 4(%%esi),%%eax; adcl %%eax,4(%%edi);
41 - movl 8(%%esi),%%eax; adcl %%eax,8(%%edi);"
42 - :"=g" (*dest):"g" (dest), "g" (x2)
43 + asm volatile ("movl %1,%%edi; movl %2,%%esi; " \
44 + "movl (%%esi),%%eax; addl %%eax,(%%edi); " \
45 + "movl 4(%%esi),%%eax; adcl %%eax,4(%%edi); " \
46 + "movl 8(%%esi),%%eax; adcl %%eax,8(%%edi); " \
47 + :"=g" (*dest):"g" (dest), "g" (x2) \
52 problem, but keep fingers crossed! */
53 static inline void add_two_Xsig(Xsig *dest, const Xsig *x2, long int *exp)
55 - asm volatile ("movl %2,%%ecx; movl %3,%%esi;
56 - movl (%%esi),%%eax; addl %%eax,(%%ecx);
57 - movl 4(%%esi),%%eax; adcl %%eax,4(%%ecx);
58 - movl 8(%%esi),%%eax; adcl %%eax,8(%%ecx);
60 - rcrl 8(%%ecx); rcrl 4(%%ecx); rcrl (%%ecx)
61 - movl %4,%%ecx; incl (%%ecx)
62 - movl $1,%%eax; jmp 1f;
63 - 0: xorl %%eax,%%eax;
65 - :"=g" (*exp), "=g" (*dest)
66 - :"g" (dest), "g" (x2), "g" (exp)
68 + asm volatile ("movl %2,%%ecx; movl %3,%%esi; " \
69 + "movl (%%esi),%%eax; addl %%eax,(%%ecx); " \
70 + "movl 4(%%esi),%%eax; adcl %%eax,4(%%ecx); " \
71 + "movl 8(%%esi),%%eax; adcl %%eax,8(%%ecx); " \
73 + "rcrl 8(%%ecx); rcrl 4(%%ecx); rcrl (%%ecx); " \
74 + "movl %4,%%ecx; incl (%%ecx); " \
75 + "movl $1,%%eax; jmp 1f; " \
76 + "0: xorl %%eax,%%eax; " \
78 + :"=g" (*exp), "=g" (*dest) \
79 + :"g" (dest), "g" (x2), "g" (exp) \
85 /* This is faster in a loop on my 386 than using the "neg" instruction. */
86 static inline void negate_Xsig(Xsig *x)
88 - asm volatile("movl %1,%%esi; "
89 - "xorl %%ecx,%%ecx; "
90 - "movl %%ecx,%%eax; subl (%%esi),%%eax; movl %%eax,(%%esi); "
91 - "movl %%ecx,%%eax; sbbl 4(%%esi),%%eax; movl %%eax,4(%%esi); "
92 - "movl %%ecx,%%eax; sbbl 8(%%esi),%%eax; movl %%eax,8(%%esi); "
93 + asm volatile("movl %1,%%esi; " \
94 + "xorl %%ecx,%%ecx; " \
95 + "movl %%ecx,%%eax; subl (%%esi),%%eax; movl %%eax,(%%esi); " \
96 + "movl %%ecx,%%eax; sbbl 4(%%esi),%%eax; movl %%eax,4(%%esi); " \
97 + "movl %%ecx,%%eax; sbbl 8(%%esi),%%eax; movl %%eax,8(%%esi); " \
98 :"=g" (*x):"g" (x):"si","ax","cx");
102 To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
103 the body of a message to majordomo@vger.kernel.org
104 More majordomo info at http://vger.kernel.org/majordomo-info.html
105 Please read the FAQ at http://www.tux.org/lkml/