Cyrille Mescam wrote:
I would like to know if you received my mail with the assembly code
It not, i'll send it again to you.
Thanks for your help.
I've looked into the files you sent me, and it seems that the problem is occuring due to the C library simplication pass (which is run by gccas). What appears to be happening is that a call to fprintf() is being changed to a call to fwrite(), but this transform is being done incorrectly because the fprintf() is being passed a ubyte * while fwrite() takes an sbyte *.
I'm creating a reduced testcase right now, but in the meantime, I'd like for you to try something. This should work around the problem that you're having (as well as verify that I understand the problem):
Go into your LLVM source tree and comment out the following line in llvm/tools/gccas/gccas.cpp:
addPass(PM, createSimplifyLibCallsPass()); // Library Call Optimizations
Rebuild gccas. Then, try to build the LLVM GCC frontend again. Please email the llvmdev list and let us know if it works.
In the meantime, I will continue to try to get a reduced test case and either fix the bug or hand it off to Reid (the author of the C library simplification pass).
-- John T.