|
From: <sv...@va...> - 2005-04-28 09:41:01
|
Author: sewardj
Date: 2005-04-28 10:40:53 +0100 (Thu, 28 Apr 2005)
New Revision: 3579
Modified:
trunk/coregrind/m_debuglog.c
Log:
Even more pissing with inline asm around to placate gcc-3.4 -fpic. We
can't trash %ebx without gcc getting unhappy, so trash %edi instead.
Modified: trunk/coregrind/m_debuglog.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_debuglog.c 2005-04-27 23:17:48 UTC (rev 3578)
+++ trunk/coregrind/m_debuglog.c 2005-04-28 09:40:53 UTC (rev 3579)
@@ -63,15 +63,18 @@
{
UInt __res;
__asm__ volatile (
- "movl $4, %%eax\n" /* set %eax =3D __NR_write */
- "movl $2, %%ebx\n" /* set %ebx =3D stderr */
- "movl %1, %%ecx\n" /* set %ecx =3D buf */
- "movl %2, %%edx\n" /* set %edx =3D n */
- "int $0x80\n" /* write(stderr, buf, n) */
- "movl %%eax, %0\n" /* set __res =3D eax */
+ "movl $4, %%eax\n" /* %eax =3D __NR_write */
+ "movl $2, %%edi\n" /* %edi =3D stderr */
+ "movl %1, %%ecx\n" /* %ecx =3D buf */
+ "movl %2, %%edx\n" /* %edx =3D n */
+ "pushl %%ebx\n"
+ "movl %%edi, %%ebx\n"
+ "int $0x80\n" /* write(stderr, buf, n) */
+ "popl %%ebx\n"
+ "movl %%eax, %0\n" /* __res =3D eax */
: "=3Dmr" (__res)
: "g" (buf), "g" (n)
- : "eax", "ebx", "ecx", "edx"
+ : "eax", "edi", "ecx", "edx"
);
if (__res < 0)=20
__res =3D -1;
|