[LLVMdev] Using llvm-mc assembler in the llvm test-suite
grosbach at apple.com
Mon Oct 15 15:54:29 PDT 2012
On Oct 15, 2012, at 3:00 PM, "Carter, Jack" <jcarter at mips.com> wrote:
> 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.
That's the equivalent, yes. Sounds like you have that covered.
> 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).
Doing it by assembling the .s files and comparing those allowed me to do the vast majority of the assembler testing without ever running the test suite on a target device (which takes a long time), or re-compiling the test-suite (which also takes a fair bit of time), thus speeding up my turnaround time.
There aren't, that I know of, makefile rules to do things the way you're asking. It could be added, of course.
> 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.
> 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.
>> LLVM Developers mailing list
>> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev