Created attachment 313 [details] Patch to add support for mfatbu and mfatbl in valgrind PowerPC uses two alternate time base registers which are read from user space by using PPC instructions mfatbu and mfatbl . However these instructions are not not supported by Valgrind. CPU : e500mc Here are the logs when an application executing such instruction is executed with Valgrind: dis_proc_ctl(ppc)(mfspr,SPR)(0x20F) disInstr(ppc): unhandled instruction: 0x7C0F82A6 primary 31(0x1F), secondary 678(0x2A6) ==2204== valgrind: Unrecognised instruction at address 0x10003dfc. ==2204== at 0x10003DFC: ??? (in /usr/bin/simple_crypto) ==2204== by 0x1000181B: ??? (in /usr/bin/simple_crypto) ==2204== by 0xFE179E7: ??? (in /lib/libpthread-2.13.so) ==2204== by 0x40EEA9B: ??? (in /lib/libc-2.13.so) ==2204== Your program just tried to execute an instruction that Valgrind ==2204== did not recognise. There are two possible reasons for this. ==2204== 1. Your program has a bug and erroneously jumped to a non-code ==2204== location. If you are running Memcheck and you just saw a ==2204== warning about a bad jump, it's probably your program's fault. ==2204== 2. The instruction is legitimate but Valgrind doesn't handle it, ==2204== i.e. it's Valgrind's fault. If you think this is the case or ==2204== you are not sure, please let us know and we'll try to fix it. ==2204== Either way, Valgrind will now raise a SIGILL signal which will ==2204== probably kill your program. We have developed a path to fix the issue. Kindly find it attached.
Fiexed in http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=d3d11016de28e955d492bc174be2bfac90a78265