|
From: Paul M. <pa...@sa...> - 2004-03-03 11:20:40
|
I have ported valgrind to PowerPC and I have it running quite nicely, on Linux of course. A patch against valgrind-2.1.0 to add PowerPC support is at: http://ozlabs.org/~paulus/ppc-valgrind.patch.gz I didn't include the patch in this message because it is moderately large (280kB uncompressed) and I thought the mailing list software might reject it. It would be good if you (valgrind developers) could look at the patch and give me any comments you have. I would like to get this stuff included in future releases. I have ended up putting in quite a few ifdefs in the code, as that was the quickest way to make the changes I needed to get it working on PowerPC. Now that it is working I think it would be worth looking over what things need to be abstracted out and what might be the best way to do that. Hopefully that will reduce the number of ifdefs. There are still a few limitations and things left to do: * It only supports 32-bit instructions at present (doesn't handle the 64-bit part of the PowerPC architecture). * It doesn't handle Altivec instructions (Altivec provides short-vector SIMD capabilities, a bit like MMX or SSE). * I haven't generated any suppressions files for libc.so or ld.so. I seem to get lots of errors from them, particularly for programs that use dlopen. I have some prototype code to improve the valid bit computations for ADD and CMP0 (compare against 0) which reduce the reported errors a lot. Glibc seems to like using the add-fefefeff and or-7f7f7f7f tricks a lot. I have a formula for getting the valid bits for the result of an ADD exactly without too much effort. * The code to set cache parameters in cachegrind is pretty minimal at present. * I punted on VG_(saneUInstr) for now. I really should go back and fill in the parts for the new UInstrs I added. Regards, Paul. |