I have "refactored" the X86AsmPrinter into a number of files ready for the MASM and NASM backends to be added. There is a new namespace llvm::X86 to replace the anomonous namespace as this does not work accross mutiple .h and .cpp files. Other than that everything is pritty straight forward, t may possibly need tweeking though. It has been built under MS VS2003, but I am not sure how to add it to the makefiles for the Cygwin and Linux platforms, help on this would be appreciated. Afaik there are no specific tests for the X86AsmPrinter. If not it would be good to create some. Also I am wondering about how to go about creating tests for the MASM and NASM backends, hints and help are welcomed. Aaron . -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20050630/3573b133/attachment.html> -------------- next part -------------- A non-text attachment was scrubbed... Name: NewX86AsmPrinter.tar.gz Type: application/x-gzip Size: 5871 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20050630/3573b133/attachment.bin>
Builds fine on Linux, but there seems to be a problem building it on Cygwin, will look into this. Aaron ----- Original Message ----- From: Aaron Gray To: LLVM Developers Mailing List Sent: Thursday, June 30, 2005 7:12 PM Subject: [LLVMdev] X86AsmPrinter + MASM and NASM backends I have "refactored" the X86AsmPrinter into a number of files ready for the MASM and NASM backends to be added. There is a new namespace llvm::X86 to replace the anomonous namespace as this does not work accross mutiple .h and .cpp files. Other than that everything is pritty straight forward, t may possibly need tweeking though. It has been built under MS VS2003, but I am not sure how to add it to the makefiles for the Cygwin and Linux platforms, help on this would be appreciated. Afaik there are no specific tests for the X86AsmPrinter. If not it would be good to create some. Also I am wondering about how to go about creating tests for the MASM and NASM backends, hints and help are welcomed. Aaron . ------------------------------------------------------------------------------ _______________________________________________ LLVM Developers mailing list LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20050630/729465d4/attachment.html>
Some wheird problem, Target/X86 builds okay now. But there seems to be another problem with the Cygwin build :- make[4]: Entering directory `/usr/build/llvm/lib/Target/SparcV9/ModuloScheduling' llvm[4]: Compiling ModuloSchedulingSuperBlock.cpp for Debug build /usr/src/llvm/lib/Target/SparcV9/ModuloScheduling/ModuloSchedulingSuperBlock.cpp : In member function `virtual bool llvm::ModuloSchedulingSBPass::runOnFunction(l lvm::Function&)': /usr/src/llvm/lib/Target/SparcV9/ModuloScheduling/ModuloSchedulingSuperBlock.cpp :151: error: `alarm' undeclared (first use this function) /usr/src/llvm/lib/Target/SparcV9/ModuloScheduling/ModuloSchedulingSuperBlock.cpp :151: error: (Each undeclared identifier is reported only once for each function it appears in.) make[4]: *** [/usr/build/llvm/lib/Target/SparcV9/ModuloScheduling/Debug/ModuloSc hedulingSuperBlock.o] Error 1 make[4]: Leaving directory `/usr/build/llvm/lib/Target/SparcV9/ModuloScheduling' make[3]: *** [ModuloScheduling/.makeall] Error 2 make[3]: Leaving directory `/usr/build/llvm/lib/Target/SparcV9' make[2]: *** [SparcV9/.makeall] Error 2 make[2]: Leaving directory `/usr/build/llvm/lib/Target' make[1]: *** [Target/.makeall] Error 2 make[1]: Leaving directory `/usr/build/llvm/lib' make: *** [all] Error 1 Aaron ----- Original Message ----- From: Aaron Gray To: LLVM Developers Mailing List Sent: Thursday, June 30, 2005 9:10 PM Subject: Re: [LLVMdev] X86AsmPrinter + MASM and NASM backends Builds fine on Linux, but there seems to be a problem building it on Cygwin, will look into this. Aaron ----- Original Message ----- From: Aaron Gray To: LLVM Developers Mailing List Sent: Thursday, June 30, 2005 7:12 PM Subject: [LLVMdev] X86AsmPrinter + MASM and NASM backends I have "refactored" the X86AsmPrinter into a number of files ready for the MASM and NASM backends to be added. There is a new namespace llvm::X86 to replace the anomonous namespace as this does not work accross mutiple .h and .cpp files. Other than that everything is pritty straight forward, t may possibly need tweeking though. It has been built under MS VS2003, but I am not sure how to add it to the makefiles for the Cygwin and Linux platforms, help on this would be appreciated. Afaik there are no specific tests for the X86AsmPrinter. If not it would be good to create some. Also I am wondering about how to go about creating tests for the MASM and NASM backends, hints and help are welcomed. Aaron . ---------------------------------------------------------------------------- _______________________________________________ LLVM Developers mailing list LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev ------------------------------------------------------------------------------ _______________________________________________ LLVM Developers mailing list LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20050630/4df391dd/attachment.html>
On Thu, 30 Jun 2005, Aaron Gray wrote:> I have "refactored" the X86AsmPrinter into a number of files ready for > the MASM and NASM backends to be added.Nice!> There is a new namespace llvm::X86 to replace the anomonous namespace as > this does not work accross mutiple .h and .cpp files. Other than that > everything is pritty straight forward, t may possibly need tweeking > though.Ok, here are my requests. Overall the code looks really good. I would appreciate it if you could make the following changes: 1. At the top of the X86AsmPrinter.cpp file, you note that the code was refactored. The comments should indicate the current state of the code, not the history. Please just say that it supports the X/Y/Z subclasses, not that it was changed to support them. Likewise in any other similar comments. In the CVS commit message, we will explain the history of the code. 2. In the .cpp files, please use the 'using namespace llvm;' idiom to avoid placing the entire C++ file in two sets of namespaces (which indents everything). Check out other .cpp files for how they are written as examples. 3. Please #include X86ASmPrinter.h first in X86asmPrinter.cpp (see the coding standard for justification). This will expose the fact that the .h file needs some #includes to be self contained. 4. I think it would be a good idea to make the isScale/isMem methods inline in the header file, even if that means more #includes are needed in the .h file. These are pretty performance sensitive for the printers, so it would be good for them to be inlined. 5. Please add #include guards around the headers (#ifndef XX_H/#define XX_H), like the other llvm headers. Once you've made these high level changes, please send the code out again and I'll check it once more. Again, the high-level refactoring looks great, and I'm glad you seperated the refactoring from the addition of new functionality!> It has been built under MS VS2003, but I am not sure how to add it to > the makefiles for the Cygwin and Linux platforms, help on this would be > appreciated.There should be no changes required for the Makefiles, unlike those silly VC project files ;-P> Afaik there are no specific tests for the X86AsmPrinter. If not it would > be good to create some.Correct. X86AsmPrinter is currently only used for debugging: no targets use it. I suspect your target will be the first real test! This also means that if it is doing something wrong, you can change it!> Also I am wondering about how to go about creating tests for the MASM > and NASM backends, hints and help are welcomed.I think the best way to do this is to start pumping code through it. If you can get the llvmgcc front-end to work in your environment, llvm-test is the place to start. Thanks for the great enhancement! -Chris -- http://nondot.org/sabre/ http://llvm.cs.uiuc.edu/
Chris, Okay, I have done as you have requested. The only thing I did not like was a clsh between the enum X86 and the new namespace X86, which I had to rename as x86 :( Anyway, I suppose the lower case 'x' in 'x86' fits in with the lowercase 'llvm' namespace. Build tested on MS VC2003 and Linux. Aaron -------------- next part -------------- A non-text attachment was scrubbed... Name: NewX86AsmPrinter.tar.gz Type: application/x-gzip Size: 5810 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20050701/3cda425e/attachment.bin>