Carter, Jack
2012-Oct-15 21:22 UTC
[LLVMdev] Using llvm-mc assembler in the llvm test-suite
Has anyone converted llvm/projects/test-suite to use the llvm assembler instead of gcc? If so, what was needed to change and how? My assumption is that this would be a good way to test the llvm assembler. Jack -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20121015/a91a495f/attachment.html>
Eric Christopher
2012-Oct-15 21:36 UTC
[LLVMdev] Using llvm-mc assembler in the llvm test-suite
On Mon, Oct 15, 2012 at 2:22 PM, Carter, Jack <jcarter at mips.com> wrote:> Has anyone converted llvm/projects/test-suite to use the llvm assembler > instead of gcc? > > If so, what was needed to change and how? > > My assumption is that this would be a good way to test the llvm assembler. >Not quite sure what you mean, as far as I know there isn't any assembler in there so if it's using clang it should be dependent upon the use of -integrated-as for your target? I miss something? -eric
Jim Grosbach
2012-Oct-15 21:40 UTC
[LLVMdev] Using llvm-mc assembler in the llvm test-suite
Yes, absolutely. There's two pieces of this that are handy. First, checking the normal integrated-assembler code path. That doesn't check the actual assembler, but rather the binary encoder and object file emitter. To test that, I did runs with a locally modified clang that enabled the integrated assembler by default for my target (ARM/Darwin at the time). The second piece is checking the assembler itself. For that, I ran the full test suite and kept the .s files around. Then I ran each .s file through plain 'as' and llvm-mc and did a binary comparison of the results. Anything that showed up, I analyzed to see if it was innocuous or an error. -Jim On Oct 15, 2012, at 2:22 PM, "Carter, Jack" <jcarter at mips.com> wrote:> Has anyone converted llvm/projects/test-suite to use the llvm assembler instead of gcc?> If so, what was needed to change and how? > > My assumption is that this would be a good way to test the llvm assembler. > > Jack > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20121015/d1e1ed27/attachment.html>
Carter, Jack
2012-Oct-15 22:00 UTC
[LLVMdev] Using llvm-mc assembler in the llvm test-suite
Let me see if I understand the response ;-) When you are saying integrated assembler do you mean llc --filetype=obj? If so, we currently have that for an option when running the test-suite. When you say that to test the llvm-mc assembler for your target you don't substitute the gcc assembler invocation for llvm-mc which would expect the resultant executable run to pass. Instead you have to do another pass running llvm-mc on the preserved .s files Did I get this right? If so, I am way too lazy and greedy. I want to run the suite and with an option, substitute the llvm standalone assembler for the gcc one (not for the control compile of course). Jack ________________________________ From: Jim Grosbach [grosbach at apple.com] Sent: Monday, October 15, 2012 2:40 PM To: Carter, Jack Cc: List Subject: Re: [LLVMdev] Using llvm-mc assembler in the llvm test-suite Yes, absolutely. There's two pieces of this that are handy. First, checking the normal integrated-assembler code path. That doesn't check the actual assembler, but rather the binary encoder and object file emitter. To test that, I did runs with a locally modified clang that enabled the integrated assembler by default for my target (ARM/Darwin at the time). The second piece is checking the assembler itself. For that, I ran the full test suite and kept the .s files around. Then I ran each .s file through plain 'as' and llvm-mc and did a binary comparison of the results. Anything that showed up, I analyzed to see if it was innocuous or an error. -Jim On Oct 15, 2012, at 2:22 PM, "Carter, Jack" <jcarter at mips.com<mailto:jcarter at mips.com>> wrote: Has anyone converted llvm/projects/test-suite to use the llvm assembler instead of gcc? If so, what was needed to change and how? My assumption is that this would be a good way to test the llvm assembler. Jack _______________________________________________ LLVM Developers mailing list LLVMdev at cs.uiuc.edu<mailto:LLVMdev at cs.uiuc.edu> http://llvm.cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20121015/8fe78b2c/attachment.html>
Carter, Jack
2012-Oct-15 22:14 UTC
[LLVMdev] Using llvm-mc assembler in the llvm test-suite
Eric, This invocation creates the .s file using llc: build/Debug+Asserts/bin/llc -march=mipsel -mcpu=mips32r2 -mattr=o32 -disable-mips-delay-filler -filetype=asm -relocation-model=pic -asm-verbose=false -O3 Output/mandel-2.llvm.mipsel.ll -o Output/mandel-2.llc.mips32r2.s -info-output-file=/home/jcarter/workarea/assembler_jack/build/projects/test-suite/SingleSource/Benchmarks/Misc/Output/mandel-2.llc.mips32r2.s.info -stats -time-passes The next line assembles it with gcc. The gcc driver will invoke gas on it. This is the part that I want to use llvm-mc. mips-linux-gnu-g++ Output/mandel-2.llc.mips32r2.s -o Output/mandel-2.llc.mips32r2 -mips32r2 -EL -lm -lstdc++ -lpthread -fPIC -mabi=32 ________________________________________ From: Eric Christopher [echristo at gmail.com] Sent: Monday, October 15, 2012 2:36 PM To: Carter, Jack Cc: List Subject: Re: [LLVMdev] Using llvm-mc assembler in the llvm test-suite On Mon, Oct 15, 2012 at 2:22 PM, Carter, Jack <jcarter at mips.com> wrote:> Has anyone converted llvm/projects/test-suite to use the llvm assembler > instead of gcc? > > If so, what was needed to change and how? > > My assumption is that this would be a good way to test the llvm assembler. >Not quite sure what you mean, as far as I know there isn't any assembler in there so if it's using clang it should be dependent upon the use of -integrated-as for your target? I miss something? -eric
Apparently Analagous Threads
- [LLVMdev] Using llvm-mc assembler in the llvm test-suite
- [LLVMdev] [MC] [llvm-mc] Getting target specific information to <target>ELFObjectWriter
- [LLVMdev] [MC] [llvm-mc] Getting target specific information to <target>ELFObjectWriter
- [LLVMdev] [MC] [llvm-mc] Getting target specific information to <target>ELFObjectWriter
- [LLVMdev] [MC] [llvm-mc] Getting target specific information to <target>ELFObjectWriter