|
From: <sv...@va...> - 2010-01-04 10:46:52
|
Author: sewardj
Date: 2010-01-04 10:46:44 +0000 (Mon, 04 Jan 2010)
New Revision: 11008
Log:
Don't trash %ebx on x86-darwin; gcc doesn't like it and goes off to sulk.
Modified:
trunk/helgrind/tests/annotate_hbefore.c
Modified: trunk/helgrind/tests/annotate_hbefore.c
===================================================================
--- trunk/helgrind/tests/annotate_hbefore.c 2010-01-04 10:31:41 UTC (rev 11007)
+++ trunk/helgrind/tests/annotate_hbefore.c 2010-01-04 10:46:44 UTC (rev 11008)
@@ -117,16 +117,18 @@
{
UWord block[4] = { (UWord)addr, expected, nyu, 2 };
__asm__ __volatile__(
+ "pushl %%ebx" "\n\t"
"movl 0(%%esi), %%edi" "\n\t" // addr
"movl 4(%%esi), %%eax" "\n\t" // expected
"movl 8(%%esi), %%ebx" "\n\t" // nyu
"xorl %%ecx,%%ecx" "\n\t"
"lock; cmpxchgl %%ebx,(%%edi)" "\n\t"
"setz %%cl" "\n\t"
- "movl %%ecx, 12(%%esi)" "\n"
+ "movl %%ecx, 12(%%esi)" "\n\t"
+ "popl %%ebx" "\n"
: /*out*/
: /*in*/ "S"(&block[0])
- : /*trash*/"memory","cc","edi","eax","ebx","ecx"
+ : /*trash*/"memory","cc","edi","eax","ecx"
);
assert(block[3] == 0 || block[3] == 1);
return block[3] & 1;
|