Discussion:
Valgrind: r16254 - in /trunk: NEWS coregrind/m_debuglog.c include/valgrind.h
(too old to reply)
s***@valgrind.org
2017-02-20 19:04:13 UTC
Permalink
Raw Message
Author: carll
Date: Mon Feb 20 19:04:13 2017
New Revision: 16254

Log:

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 <***@vnet.ibm.com>

Tested and committed by: Carl Love <***@us.ibm.com>

Bugzilla is 376729.

Modified:
trunk/NEWS
trunk/coregrind/m_debuglog.c
trunk/include/valgrind.h

Modified: trunk/NEWS
==============================================================================
--- trunk/NEWS (original)
+++ trunk/NEWS Mon Feb 20 19:04:13 2017
@@ -129,6 +129,7 @@
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)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Modified: trunk/coregrind/m_debuglog.c
==============================================================================
--- trunk/coregrind/m_debuglog.c (original)
+++ trunk/coregrind/m_debuglog.c Mon Feb 20 19:04:13 2017
@@ -215,7 +215,7 @@
:
: "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 @@
: "=&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;
}

Modified: trunk/include/valgrind.h
==============================================================================
--- trunk/include/valgrind.h (original)
+++ trunk/include/valgrind.h Mon Feb 20 19:04:13 2017
@@ -2708,7 +2708,7 @@
#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 @@
#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

Loading...