Wednesday, August 16, 2006

The bug killer!

Good: now I can use valgrind. How? I had to port everything to a Linux machine. This brought endless sadness, so, I hope I don't have to do this again. Anyways, to tell LLVM on the X86 to generate code for Power PC is very easy: valgrind -v llc -march=ppc32 -f u8.bc -o ch.s. With valgrind I found the unmerciful error in my previous code; that error had costed me more than four hours of debugging. I think I fixed most of the memory errors, although I still may be having problems. I got this message here from valgrind. Do you know what it means? Well, I sort of know, but I am too busy with the other benchmarks, and I will look into it later. I still have to be able to use the automatic testing tool that comes with LLVM. Hum... there is something trick though: I cannot implement floating point swaps with XOR instructions... so, I am using three operations to swap a and b: sSUB a, b, a, SUB b, b, a, ADD a, b, a. It worked fine with all the benchmarks that I have tested, but... if someone uses financial applications, please, don't use this compiler. Actually, if you use financial applications, don't use IEEE floating point numbers.

0 Comments:

Post a Comment

<< Home