Bug 306590

Summary: not support e500v2 spe 0x216 command
Product: [Developer tools] valgrind Reporter: jack zhang <jack.zhang>
Component: callgrindAssignee: Josef Weidendorfer <josef.weidendorfer>
Status: CONFIRMED ---    
Severity: normal CC: jseward, maxime.simard, michael-dev, stigge
Priority: NOR    
Version First Reported In: 3.7.0   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: solve 0x216 spe command not support
solve 0x216 spe command not support and add some description

Description jack zhang 2012-09-11 07:44:13 UTC
e500v2 spe  0x216 command has not been support. so I solve it use my patch the line506.


Reproducible: Always

Steps to Reproduce:
valgrind --tool=callgrind app

Actual Results:  
alway show
 disInstr(ppc): declined to decode a SignalProcessing-Optional insn.
disInstr(ppc): unhandled instruction: 0x10000216
                 primary 4(0x4), secondary 534(0x216)
Comment 1 jack zhang 2012-09-11 07:45:35 UTC
Created attachment 73807 [details]
solve 0x216 spe command not support
Comment 2 Maxime Simard 2012-09-24 14:59:40 UTC
My team and I encontered the same problem today and this is a blocking issue when using MemCheck.

==796== Memcheck, a memory error detector
==796== Copyright (C) 2002-2012, and GNU GPL'd, by Julian Seward et al.
==796== Using Valgrind-3.8.0 and LibVEX; rerun with -h for copyright info
==796== Command:
==796==
disInstr(ppc): declined to decode an AltiVec insn.
disInstr(ppc): unhandled instruction: 0x13CB0321
                 primary 4(0x4), secondary 801(0x321)
==796== valgrind: Unrecognised instruction at address 0xffcdcbc.
==796==    at 0xFFCDCBC: _dl_catch_error (in /lib/ld-2.5.so)
==796==    by 0xFFC2B7F: do_preload (in /lib/ld-2.5.so)
==796==    by 0xFFC56F7: dl_main (in /lib/ld-2.5.so)
==796==    by 0xFFD44BF: _dl_sysdep_start (in /lib/ld-2.5.so)
==796==    by 0xFFC23B7: _dl_start_final (in /lib/ld-2.5.so)
==796==    by 0xFFC28FB: _dl_start (in /lib/ld-2.5.so)
==796==    by 0xFFD4FF7: _start (in /lib/ld-2.5.so)

I voted for this issue be addressed and included asap in a minor version of Valgrind.
Comment 3 jack zhang 2012-09-27 03:13:50 UTC
I got a patch from John Mehaffey, which is for valgrind3.5.0 as following http://sourceforge.net/mailarchive/message.php?msg_id=25842534, then I ported it to valgrind 3.7.0 and added some more codes of my own. finally. it's attachment 73807 [details].
Comment 4 jack zhang 2012-09-27 08:31:21 UTC
Created attachment 74189 [details]
solve 0x216 spe command not support and add some description

solve 0x216 spe command not support and add commit message about code credit.
Comment 5 Julian Seward 2013-03-01 09:09:19 UTC
Hmm, could you add some test cases?  It would be nice to support SPE
if it is easy, but I don't want to add support for instructions without test
cases -- that causes big problems later.  See eg none/tests/ppc32 for some
examples.
Comment 6 Roland Stigge 2013-03-20 12:32:31 UTC
I ported the patch to valgrind 3.8 for Debian.

You can use it freely from: http://bugs.debian.org/703503
Comment 7 michael-dev 2013-06-05 11:22:57 UTC
*** This bug has been confirmed by popular vote. ***
Comment 8 michael-dev 2013-06-05 17:45:21 UTC
The debian patchset requires fmr hardware support - with e500v2 does not have.

http://www.freescale.com/files/32bit/doc/app_note/AN3531.pdf
Comment 9 michael-dev 2013-06-05 18:21:24 UTC
see #306590
see #289836
see #268106