Bug 376729 - PPC64, remove R2 from the clobber list
Summary: PPC64, remove R2 from the clobber list
Status: RESOLVED FIXED
Alias: None
Product: valgrind
Classification: Developer tools
Component: general (show other bugs)
Version: 3.12 SVN
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Julian Seward
URL:
Keywords:
: 371668 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-02-20 18:51 UTC by Carl Love
Modified: 2017-03-06 14:11 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
On ppc64*, the TOC ptr should not be considered a scratch register (2.09 KB, patch)
2017-02-20 18:56 UTC, Carl Love
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Carl Love 2017-02-20 18:51:38 UTC
Mark Wielaard reported the following issue

"GCC now diagnoses inline assembly that clobbers register r2. This has always been invalid code, and is no longer quietly tolerated."

in redhat bug:  https://bugzilla.redhat.com/show_bug.cgi?id=1424367
Comment 1 Carl Love 2017-02-20 18:56:21 UTC
Created attachment 104133 [details]
On ppc64*, the TOC ptr should not be considered a scratch register

Will Schmidt created the attached patch to address the issue.  His fix description is as follows:


"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."
Comment 2 Carl Love 2017-02-20 19:00:03 UTC
Mark Wielaard tested the patch, as reported on the RH bugzilla:

That patch fixes things. All arches build now.
Comment 3 Carl Love 2017-02-20 19:05:51 UTC
I tested and applied Will's patch to Valgrind mainline

valgrind commit 16254.
Comment 4 Julian Seward 2017-03-06 14:11:43 UTC
*** Bug 371668 has been marked as a duplicate of this bug. ***