Joerg Sonnenberger
2015-Mar-17 22:21 UTC
[LLVMdev] Target-specific defaults for LLVM tools?
On Tue, Mar 17, 2015 at 03:00:48PM -0700, Steve King wrote:> >> If clang is the user's one stop shop, here's one such cross compiler > >> example I'd like to understand better: GNU binutils has no clue of my > >> target. Instead of trying to use gas, how should GNU-less targets > >> enable clang invoke llvm-mc to assemble? > >> > > -fintegrated-as / -fno-integrated-as > > I tried, but integrated-as was impractical due to too many possible > machine code matches for a given assembly statement. So, the compiler > deals in pseudos and emits .s files. If the integrated assembler > could accept an assembly string instead of an mcinst, I'd be in > business. > > Regardless, users could pass .s files on the command line and Clang > would still need to call llvm-mc with the right options.You don't make sense to me. IAS uses the same parser as llvm-mc. Joerg
Clang correctly assembled a .s file when using the -integrated-as option. Thanks, that is news to me! However, without -integrated-as, clang invoked 'as', which won't work for a GNU-less target. Accepting assembler invocation as a good case study for target specific clang defaults, what is the proper solution? On Tue, Mar 17, 2015 at 3:21 PM, Joerg Sonnenberger <joerg at britannica.bec.de> wrote:> On Tue, Mar 17, 2015 at 03:00:48PM -0700, Steve King wrote: >> >> If clang is the user's one stop shop, here's one such cross compiler >> >> example I'd like to understand better: GNU binutils has no clue of my >> >> target. Instead of trying to use gas, how should GNU-less targets >> >> enable clang invoke llvm-mc to assemble? >> >> >> > -fintegrated-as / -fno-integrated-as >> >> I tried, but integrated-as was impractical due to too many possible >> machine code matches for a given assembly statement. So, the compiler >> deals in pseudos and emits .s files. If the integrated assembler >> could accept an assembly string instead of an mcinst, I'd be in >> business. >> >> Regardless, users could pass .s files on the command line and Clang >> would still need to call llvm-mc with the right options. > > You don't make sense to me. IAS uses the same parser as llvm-mc. > > Joerg > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >
Joerg Sonnenberger
2015-Mar-17 23:54 UTC
[LLVMdev] Target-specific defaults for LLVM tools?
On Tue, Mar 17, 2015 at 04:35:07PM -0700, Steve King wrote:> Clang correctly assembled a .s file when using the -integrated-as > option. Thanks, that is news to me! However, without -integrated-as, > clang invoked 'as', which won't work for a GNU-less target. Accepting > assembler invocation as a good case study for target specific clang > defaults, what is the proper solution?Look for hasIntegratedAssembler and IsIntegratedAssemblerDefault. Joerg
On 3/17/15 5:35 PM, Steve King wrote:> Clang correctly assembled a .s file when using the -integrated-as > option. Thanks, that is news to me! However, without -integrated-as, > clang invoked 'as', which won't work for a GNU-less target. Accepting > assembler invocation as a good case study for target specific clang > defaults, what is the proper solution?Again, what is the target architecture? (I understand if it's an out-of-tree backend that you can't talk about. If so, I'll stop bugging you about this point.) For some targets, -integrated-as the default is on, for others it defaults to off. It generally depends on how good the integrated assembler is for that target. For example, the default on ARM used to be -no-integrated-as because IAS just wasn't mature enough at the time. The "proper solution" here w.r.t. assemblers is to implement full support for the integrated assembler for the target arch in llvm, and then flip the default for that target. -- Jon Roelofs jonathan at codesourcery.com CodeSourcery / Mentor Embedded
Maybe Matching Threads
- [LLVMdev] Target-specific defaults for LLVM tools?
- [LLVMdev] Target-specific defaults for LLVM tools?
- [LLVMdev] [compiler-rt] CMake bug in building ARM builtins library
- [llvm-lit] Is it possible to write a test for Linux only?
- [llvm-lit] Is it possible to write a test for Linux only?