]>
Commit | Line | Data |
---|---|---|
8be74f1b JR |
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. | |
5 | ||
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... | |
11 | ||
12 | Please apply, | |
13 | ||
14 | -Erik | |
15 | ||
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 | |
17 | ||
18 | -- | |
19 | Erik B. Andersen http://codepoet-consulting.com/ | |
20 | --This message was written using 73% post-consumer electrons-- | |
21 | ||
22 | ||
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 | |
25 | @@ -64,7 +64,7 @@ | |
26 | const unsigned long arg2) | |
27 | { | |
28 | int retval; | |
29 | - asm volatile ("mull %2; movl %%edx,%%eax" \ | |
30 | + asm volatile ("mull %2; movl %%edx,%%eax; " \ | |
31 | :"=a" (retval) \ | |
32 | :"0" (arg1), "g" (arg2) \ | |
33 | :"dx"); | |
34 | @@ -75,11 +75,11 @@ | |
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) | |
37 | { | |
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) \ | |
48 | :"ax","si","di"); | |
49 | } | |
50 | ||
51 | @@ -90,19 +90,19 @@ | |
52 | problem, but keep fingers crossed! */ | |
53 | static inline void add_two_Xsig(Xsig *dest, const Xsig *x2, long int *exp) | |
54 | { | |
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); | |
59 | - jnc 0f; | |
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; | |
64 | - 1:" | |
65 | - :"=g" (*exp), "=g" (*dest) | |
66 | - :"g" (dest), "g" (x2), "g" (exp) | |
67 | - :"cx","si","ax"); | |
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); " \ | |
72 | + "jnc 0f; " \ | |
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; " \ | |
77 | + "1: " \ | |
78 | + :"=g" (*exp), "=g" (*dest) \ | |
79 | + :"g" (dest), "g" (x2), "g" (exp) \ | |
80 | + :"cx","si","ax"); | |
81 | } | |
82 | ||
83 | ||
84 | @@ -110,11 +110,11 @@ | |
85 | /* This is faster in a loop on my 386 than using the "neg" instruction. */ | |
86 | static inline void negate_Xsig(Xsig *x) | |
87 | { | |
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"); | |
99 | } | |
100 | ||
101 | - | |
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/ |