Bug 270794 - New IBM POWER7 support patch causes regression in none/tests
Summary: New IBM POWER7 support patch causes regression in none/tests
Status: RESOLVED FIXED
Alias: None
Product: valgrind
Classification: Developer tools
Component: general (show other bugs)
Version: 3.7 SVN
Platform: Unlisted Binaries Linux
: NOR normal
Target Milestone: ---
Assignee: Julian Seward
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-12 21:44 UTC by Maynard Johnson
Modified: 2011-04-16 01:09 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
Patch to fix this bug (1.80 KB, patch)
2011-04-12 21:44 UTC, Maynard Johnson
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Maynard Johnson 2011-04-12 21:44:40 UTC
Created attachment 58861 [details]
Patch to fix this bug

Bug # 267630 adds support for the IBM POWER7.  There's a very minor bug in the patch attached to that bug report that causes a problem running the 'jm-insns' program in none/tests/ppc{32|64}.  The problem only shows up under the following conditions:
  1. Running on an IBM processor without Altivec support (e.g., POWER5)
  2. Building with a new enough compiler that recognizes the '-mvsx' flag
  3. Running the jm-insns testcase without the test harness, as follows:
        ./vg-in-place --tool=none none/tests/ppc{32|64}/jm-insns -a

Invoking the testcase this way will result in an ugly message:
---------
==3958== Process terminating with default action of signal 4 (SIGILL)
==3958==  Illegal opcode at address 0x568D64C
==3958==    at 0x100074B8: main (jm-insns.c:4422)
---------

... versus the slightly more user-friendly message that would be expected in this situation:
---------
disInstr(ppc): declined to decode an AltiVec insn.
disInstr(ppc): unhandled instruction: 0x7C0048CE
                 primary 31(0x1F), secondary 206(0xCE)
==3924== valgrind: Unrecognised instruction at address 0x10004254.
==3924==    at 0x10004254: main (jm-insns.c:4422)
---------

On the other hand, if you invoke the "jm-insns -a" testcase using the test harness as follows:
  perl tests/vg_tests none/tests/ppc{32|64}/jm-vmx

... the prereq check for VMX support will return false and the testcase won't be run at all.
Comment 1 Maynard Johnson 2011-04-13 02:00:51 UTC
By rights, this bug should show a dependency on bug # 267630, but I just can't see where to add that dependency.
Comment 2 Julian Seward 2011-04-15 13:51:16 UTC
Committed as a small part of the fix for #267630 (r11697 and r2127).