On ppc64*, R2 is the TOC pointer, should not be considered a scratch register, and thus should not be in the clobber list. This is called out in newer GCC releases and triggers a compile time error. Thusly, remove R2 from the clobber list. diff --git a/coregrind/m_debuglog.c b/coregrind/m_debuglog.c index dc6e26d..be77680 100644 --- a/coregrind/m_debuglog.c +++ b/coregrind/m_debuglog.c @@ -215,7 +215,7 @@ static UInt local_sys_write_stderr ( const HChar* buf, Int n ) : : "b" (block) : "cc","memory","cr0","ctr", - "r0","r2","r3","r4","r5","r6","r7","r8","r9","r10","r11","r12" + "r0","r3","r4","r5","r6","r7","r8","r9","r10","r11","r12" ); if (block[0] < 0) block[0] = -1; @@ -231,7 +231,7 @@ static UInt local_sys_getpid ( void ) : "=&r" (__res) : "i" (__NR_getpid) : "cc","memory","cr0","ctr", - "r0","r2","r4","r5","r6","r7","r8","r9","r10","r11","r12" + "r0","r4","r5","r6","r7","r8","r9","r10","r11","r12" ); return (UInt)__res; } diff --git a/include/valgrind.h b/include/valgrind.h index 6892007..d2e7c38 100644 --- a/include/valgrind.h +++ b/include/valgrind.h @@ -2708,7 +2708,7 @@ typedef #define __CALLER_SAVED_REGS \ "lr", "ctr", "xer", \ "cr0", "cr1", "cr2", "cr3", "cr4", "cr5", "cr6", "cr7", \ - "r0", "r2", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10", \ + "r0", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10", \ "r11", "r12", "r13" /* Macros to save and align the stack before making a function @@ -3264,7 +3264,7 @@ typedef #define __CALLER_SAVED_REGS \ "lr", "ctr", "xer", \ "cr0", "cr1", "cr2", "cr3", "cr4", "cr5", "cr6", "cr7", \ - "r0", "r2", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10", \ + "r0", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10", \ "r11", "r12", "r13" /* Macros to save and align the stack before making a function