301265 - add x86 support to Android build
Patch by Dragos Tatulea.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12835 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/coregrind/m_debuglog.c b/coregrind/m_debuglog.c
index 8e1c032..88c3a64 100644
--- a/coregrind/m_debuglog.c
+++ b/coregrind/m_debuglog.c
@@ -76,12 +76,14 @@
Int result;
__asm__ volatile (
+ "pushl %%ebx\n"
"movl $"VG_STRINGIFY(__NR_write)", %%eax\n" /* %eax = __NR_write */
"movl $2, %%ebx\n" /* %ebx = stderr */
"int $0x80\n" /* write(stderr, buf, n) */
+ "popl %%ebx\n"
: /*wr*/ "=a" (result)
: /*rd*/ "c" (buf), "d" (n)
- : /*trash*/ "ebx", "edi", "memory", "cc"
+ : /*trash*/ "edi", "memory", "cc"
);
return result >= 0 ? result : -1;