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.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3579 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/coregrind/m_debuglog.c b/coregrind/m_debuglog.c
index 3808e60..940d188 100644
--- a/coregrind/m_debuglog.c
+++ b/coregrind/m_debuglog.c
@@ -63,15 +63,18 @@
 {
    UInt __res;
    __asm__ volatile (
-      "movl $4, %%eax\n"   /* set %eax = __NR_write */
-      "movl $2, %%ebx\n"   /* set %ebx = stderr */
-      "movl %1, %%ecx\n"   /* set %ecx = buf */
-      "movl %2, %%edx\n"   /* set %edx = n */
-      "int $0x80\n"        /* write(stderr, buf, n) */
-      "movl %%eax, %0\n"   /* set __res = eax */
+      "movl  $4, %%eax\n"    /* %eax = __NR_write */
+      "movl  $2, %%edi\n"    /* %edi = stderr */
+      "movl  %1, %%ecx\n"    /* %ecx = buf */
+      "movl  %2, %%edx\n"    /* %edx = n */
+      "pushl %%ebx\n"
+      "movl  %%edi, %%ebx\n"
+      "int   $0x80\n"        /* write(stderr, buf, n) */
+      "popl  %%ebx\n"
+      "movl  %%eax, %0\n"    /* __res = eax */
       : "=mr" (__res)
       : "g" (buf), "g" (n)
-      : "eax", "ebx", "ecx", "edx"
+      : "eax", "edi", "ecx", "edx"
    );
    if (__res < 0) 
       __res = -1;