]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Patch submitted by Will Schmidt for PPC64.
authorCarl Love <cel@us.ibm.com>
Mon, 20 Feb 2017 19:04:13 +0000 (19:04 +0000)
committerCarl Love <cel@us.ibm.com>
Mon, 20 Feb 2017 19:04:13 +0000 (19:04 +0000)
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 <will_schmidt@vnet.ibm.com>
Tested and committed by: Carl Love <cel@us.ibm.com>

Bugzilla is 376729.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16254

NEWS
coregrind/m_debuglog.c
include/valgrind.h

diff --git a/NEWS b/NEWS
index 9c324a0110b6d67096f92bae2121e5f2d5982ae5..a1560931362777dacc50fb6cd08f0621d3960c1f 100644 (file)
--- 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)
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
index dc6e26d2e8735accd67b3a492fb1772a6a04e524..be776803bab0f63dafe03ba597ce304f814df2fc 100644 (file)
@@ -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;
 }
index 86d9bfe803e357ac371f8634d833629981c9dd7c..dc7dca7b8b0f02978dc297718d362488ebf63da2 100644 (file)
@@ -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