From: Erik Andersen <andersen@codepoet.org>
To: Marcelo Tosatti <marcelo@conectiva.com.br>
Cc: linux-kernel <linux-kernel@vger.kernel.org>
Subject: [PATCH] make x86 math-emu in 2.4.21 compile with gcc 3.3
Date: Sat, 21 Jun 2003 01:30:25 -0600 [thread overview]
Message-ID: <20030621073025.GA27921@codepoet.org> (raw)
I'm surprised this hasn't shown up before, but I guess nobody has
tried compiling 2.4.21 for i386 using gcc 3.3 yet. Currently the
x86 math-emu code does not compile with gcc 3.3 due to some
missing semicolons and quotes. This patch fixes things up so it
compiles once again.
-Erik
--
Erik B. Andersen http://codepoet-consulting.com/
--This message was written using 73% post-consumer electrons--
--- linux-2.4.21-erik/arch/i386/math-emu/poly.h.orig 2003-06-21 01:25:29.000000000 -0600
+++ linux-2.4.21-erik/arch/i386/math-emu/poly.h 2003-06-21 01:24:25.000000000 -0600
@@ -64,9 +64,9 @@
const unsigned long arg2)
{
int retval;
- asm volatile ("mull %2; movl %%edx,%%eax" \
- :"=a" (retval) \
- :"0" (arg1), "g" (arg2) \
+ asm volatile ("mull %2; movl %%edx,%%eax;"
+ :"=a" (retval)
+ :"0" (arg1), "g" (arg2)
:"dx");
return retval;
}
@@ -75,10 +75,10 @@
/* Add the 12 byte Xsig x2 to Xsig dest, with no checks for overflow. */
static inline void add_Xsig_Xsig(Xsig *dest, const Xsig *x2)
{
- asm volatile ("movl %1,%%edi; movl %2,%%esi;
- movl (%%esi),%%eax; addl %%eax,(%%edi);
- movl 4(%%esi),%%eax; adcl %%eax,4(%%edi);
- movl 8(%%esi),%%eax; adcl %%eax,8(%%edi);"
+ asm volatile ("movl %1,%%edi; movl %2,%%esi;"
+ "movl (%%esi),%%eax; addl %%eax,(%%edi);"
+ "movl 4(%%esi),%%eax; adcl %%eax,4(%%edi);"
+ "movl 8(%%esi),%%eax; adcl %%eax,8(%%edi);"
:"=g" (*dest):"g" (dest), "g" (x2)
:"ax","si","di");
}
@@ -90,19 +90,19 @@
problem, but keep fingers crossed! */
static inline void add_two_Xsig(Xsig *dest, const Xsig *x2, long int *exp)
{
- asm volatile ("movl %2,%%ecx; movl %3,%%esi;
- movl (%%esi),%%eax; addl %%eax,(%%ecx);
- movl 4(%%esi),%%eax; adcl %%eax,4(%%ecx);
- movl 8(%%esi),%%eax; adcl %%eax,8(%%ecx);
- jnc 0f;
- rcrl 8(%%ecx); rcrl 4(%%ecx); rcrl (%%ecx)
- movl %4,%%ecx; incl (%%ecx)
- movl $1,%%eax; jmp 1f;
- 0: xorl %%eax,%%eax;
- 1:"
+ asm volatile ("movl %2,%%ecx; movl %3,%%esi;"
+ "movl (%%esi),%%eax; addl %%eax,(%%ecx);"
+ "movl 4(%%esi),%%eax; adcl %%eax,4(%%ecx);"
+ "movl 8(%%esi),%%eax; adcl %%eax,8(%%ecx);"
+ "jnc 0f;"
+ "rcrl 8(%%ecx); rcrl 4(%%ecx); rcrl (%%ecx);"
+ "movl %4,%%ecx; incl (%%ecx);"
+ "movl $1,%%eax; jmp 1f;"
+ "0: xorl %%eax,%%eax;"
+ "1:"
:"=g" (*exp), "=g" (*dest)
:"g" (dest), "g" (x2), "g" (exp)
- :"cx","si","ax");
+ :"cx","si","ax");
}
@@ -110,11 +110,11 @@
/* This is faster in a loop on my 386 than using the "neg" instruction. */
static inline void negate_Xsig(Xsig *x)
{
- asm volatile("movl %1,%%esi; "
- "xorl %%ecx,%%ecx; "
- "movl %%ecx,%%eax; subl (%%esi),%%eax; movl %%eax,(%%esi); "
- "movl %%ecx,%%eax; sbbl 4(%%esi),%%eax; movl %%eax,4(%%esi); "
- "movl %%ecx,%%eax; sbbl 8(%%esi),%%eax; movl %%eax,8(%%esi); "
+ asm volatile("movl %1,%%esi;"
+ "xorl %%ecx,%%ecx;"
+ "movl %%ecx,%%eax; subl (%%esi),%%eax; movl %%eax,(%%esi);"
+ "movl %%ecx,%%eax; sbbl 4(%%esi),%%eax; movl %%eax,4(%%esi);"
+ "movl %%ecx,%%eax; sbbl 8(%%esi),%%eax; movl %%eax,8(%%esi);"
:"=g" (*x):"g" (x):"si","ax","cx");
}
reply other threads:[~2003-06-21 7:16 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20030621073025.GA27921@codepoet.org \
--to=andersen@codepoet.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marcelo@conectiva.com.br \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox