Bug 334384 - Valgrind does not have support Little Endian support for IBM POWER PPC 64
Summary: Valgrind does not have support Little Endian support for IBM POWER PPC 64
Status: RESOLVED FIXED
Alias: None
Product: valgrind
Classification: Developer tools
Component: general (show other bugs)
Version: 3.9.0
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Julian Seward
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-05 17:02 UTC by Carl Love
Modified: 2014-08-07 23:18 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Initial PPC64 LE support patch (39.65 KB, patch)
2014-05-05 17:07 UTC, Carl Love
Details
Initial PPC64 LE support patch, updated (39.66 KB, patch)
2014-05-22 23:51 UTC, Carl Love
Details
Initial PPC64LE support patch, updated to upstream code base as of 6/2/14 (39.66 KB, patch)
2014-06-03 16:27 UTC, Carl Love
Details
updated PPC64 Little endian pre patch (143.69 KB, patch)
2014-06-20 17:06 UTC, Carl Love
Details
Updated PPC64 LE support patch, fixed a couple of typos (143.71 KB, patch)
2014-06-25 18:26 UTC, Carl Love
Details
Updated PPC64 LE support patch to address Julian's comments (144.08 KB, patch)
2014-07-08 18:21 UTC, Carl Love
Details
Updated PPC64 LE support patch to address feedback from Mark Wielaard (139.04 KB, patch)
2014-07-21 20:28 UTC, Carl Love
Details
Updated PPC64 LE support patch to work with Julian's Endian patches (92.24 KB, patch)
2014-07-29 19:22 UTC, Carl Love
Details
Updated PPC64 LE support patch to work with Julian's Endian patches (92.24 KB, patch)
2014-08-07 22:44 UTC, Carl Love
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Carl Love 2014-05-05 17:02:18 UTC
IBM POWER PPC64 now supports Big and Little Endian.  Valgind currently only supports the Big Endian for PPC64.  This bugzilla is for the first patch in a series to add the Little Endian support for PPC64 to Valgrind.

Reproducible: Always
Comment 1 Carl Love 2014-05-05 17:07:53 UTC
Created attachment 86474 [details]
Initial PPC64 LE support patch

This patch adds the #if for ppc64le to the various files that do not require any additional changes.  The next patch will add the needed source code changes.
Comment 2 Maynard Johnson 2014-05-13 13:31:02 UTC
I have reviewed and ack the attached "Initial PPC64 LE support patch".
Comment 3 Carl Love 2014-05-22 23:51:53 UTC
Created attachment 86784 [details]
Initial PPC64 LE support patch, updated
Comment 4 Carl Love 2014-06-03 16:27:46 UTC
Created attachment 86994 [details]
Initial PPC64LE support patch, updated to upstream code base as of 6/2/14

Forward ported patch to the 6/2/14 code base.  No functional changes
Comment 5 Julian Seward 2014-06-09 09:02:57 UTC
See bug 334834 for initial comments about the patch sequence (that is,
bug 334384 (prelims), bug 334834 (implementation) and 334836 (test cases).
Comment 6 Carl Love 2014-06-20 17:06:23 UTC
Created attachment 87312 [details]
updated PPC64 Little endian pre patch

This updated patch addresses the naming issues that Julian mentioned about the patches.  See comments in https://bugs.kde.org/show_bug.cgi?id=334834.  

This updated patch changes the existing VGA_ppc64 to VGA_ppc64be for Big Endian specific code.  The #define VGA_ppc64le is introduced for the Little Endian code.  Note there are no generic #defines for BE and LE.  The patch ensures that the function names, #defines and variables use ppc64 or PPC64 for things that are common to BE and LE.  The name ppc64be and PPC64BE is used for BE specific code.  Similarly ppc64le and PPC64LE is for LE spcific code.  The term ppc64 and PPC64 is for code that is common to BE and LE.  The LE #defines were added for the code that is common to LE and BE.
Comment 7 Carl Love 2014-06-25 18:26:58 UTC
Created attachment 87400 [details]
Updated PPC64 LE support patch, fixed a couple of typos

Updated patch, I found a couple of typos that needed fixing.
Comment 8 Julian Seward 2014-07-07 21:07:28 UTC
(In reply to comment #7)
> Created attachment 87400 [details]


Looks fine, only very minor comments.


include/valgrind.h
The comment line
/* ------------------------ ppc64-linux ------------------------ */
didn't get "be"'d.

(happens again further down)


tests/check_isa-2_06_cap
-DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+DIR="$( cd "$( dirname "$0" )" && pwd )"

What's the significance of the change from "${BASH_SOURCE[0]}" to
"$0" ?
Comment 9 Carl Love 2014-07-08 18:21:53 UTC
Created attachment 87648 [details]
Updated PPC64 LE support patch to address Julian's comments

The edits to add be was done.  

> What's the significance of the change from "${BASH_SOURCE[0]}" to "$0" ?

The change was made because we found that the use of BASH_SOURCE is not supported across all shells so the code was changed to $0 which is supported accross the various shells.  In general, the use of the BASH_* variables is not portable.
Comment 10 Carl Love 2014-07-21 20:28:46 UTC
Created attachment 87864 [details]
Updated PPC64 LE support patch to address feedback from Mark Wielaard

Mark noted that the third patch in the series for adding the LE functional tests had some fixes that were done in the previous patches but should have been in the last patch.  This patch has been updated to move the test chages to the third patch (https://bugs.kde.org/show_bug.cgi?id=334836) which adds the test case changes.
Comment 11 Carl Love 2014-07-29 19:22:35 UTC
Created attachment 88017 [details]
Updated PPC64 LE support patch to work with Julian's Endian patches

The patch was reworked to work with the trunk changes for endian support.
Comment 12 Carl Love 2014-08-07 22:44:42 UTC
Created attachment 88152 [details]
Updated PPC64 LE support patch to work with Julian's Endian patches

The patch has been updated to the Valgrind code tree as of Aug 7, 2014 in preparation for comitting.
Comment 13 Carl Love 2014-08-07 23:18:57 UTC
Patch committed.  Revision 14238  Note patch does not touch the VEX code.