From: Carl Love Date: Mon, 20 Feb 2017 19:04:13 +0000 (+0000) Subject: Patch submitted by Will Schmidt for PPC64. X-Git-Tag: svn/VALGRIND_3_13_0~167 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=41308849efb1f35816d409855314184e852c742d;p=thirdparty%2Fvalgrind.git Patch submitted by Will Schmidt for PPC64. On ppc64*, the TOC ptr should not be considered a scratch register, and should not be in the clobber list. This is called out in newer GCC (i.e. gcc7) and triggers an error. Thusly, remove R2 from the clobber list. Signed-Off-By: Will Schmidt Tested and committed by: Carl Love Bugzilla is 376729. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16254 --- diff --git a/NEWS b/NEWS index 9c324a0110..a156093136 100644 --- a/NEWS +++ b/NEWS @@ -129,6 +129,7 @@ where XXXXXX is the bug number as listed below. 376455 Solaris: unhandled syscall lgrpsys(180) 376518 Solaris: unhandled fast trap getlgrp(6) 376611 ppc64 and arm64 don't know about prlimit64 syscall +376729 PPC64, remove R2 from the clobber list Release 3.12.0 (20 October 2016) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/coregrind/m_debuglog.c b/coregrind/m_debuglog.c index dc6e26d2e8..be776803ba 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 86d9bfe803..dc7dca7b8b 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