search for: assemblyfile

Displaying 15 results from an estimated 15 matches for "assemblyfile".

2009 Mar 08
2
[LLVMdev] addPassesToEmitFile
...tForJIT(Err); std::string FeaturesStr; llvm::TargetMachine* target(_arch->CtorFn(*_module, FeaturesStr)); assert(target && "Could not allocate target machine!"); std::ostringstream os; target->addPassesToEmitFile(*_passManager, os, llvm::TargetMachine::AssemblyFile, true); target->addPassesToEmitFileFinish(*_passManager, 0, true); However, in newer versions of llvm, like 2.5 that I'm testing now, I had to change the code to something like this: std::string Err; const llvm::TargetMachineRegistry::entry* _arch = llvm::TargetMachineRegist...
2009 Mar 08
0
[LLVMdev] addPassesToEmitFile
...g FeaturesStr; >    llvm::TargetMachine* target(_arch->CtorFn(*_module, FeaturesStr)); >    assert(target && "Could not allocate target machine!"); > >    std::ostringstream os; > >    target->addPassesToEmitFile(*_passManager, os, > llvm::TargetMachine::AssemblyFile, true); >    target->addPassesToEmitFileFinish(*_passManager, 0, true); > > > > However, in newer versions of llvm, like 2.5 that I'm testing now, I > had to change the code to something like this: > > >    std::string Err; >    const llvm::TargetMachineRegistry...
2009 Mar 09
1
[LLVMdev] addPassesToEmitFile
...   llvm::TargetMachine* target(_arch->CtorFn(*_module, FeaturesStr)); > >    assert(target && "Could not allocate target machine!"); > > >    std::ostringstream os; > > >    target->addPassesToEmitFile(*_passManager, os, > > llvm::TargetMachine::AssemblyFile, true); > >    target->addPassesToEmitFileFinish(*_passManager, 0, true); > > > However, in newer versions of llvm, like 2.5 that I'm testing now, I > > had to change the code to something like this: > > >    std::string Err; > >    const llvm::TargetMachi...
2008 May 28
1
[LLVMdev] Asm output while executing
...; llvm::TargetMachine &Target = *target.get(); llvm::FunctionPassManager Passes(new llvm::ExistingModuleProvider(_module)); Passes.add(new llvm::TargetData(*Target.getTargetData())); std::ostringstream os; Target.addPassesToEmitFile(Passes,os,llvm::TargetMachine::AssemblyFile, true); Passes.doInitialization(); for (llvm::Module::iterator I = _module->begin(), E=_module->end(); I != E; ++I) if (!I->isDeclaration()) { Passes.run(*I); } Passes.doFinalization(); /// The execution llvm::Function *inp...
2014 Jan 26
2
[LLVMdev] [llmdev] fail to process llvm generated assembly on windows/mingw32
...ple); targetMachine.setAsmVerbosityDefault(true); targetMachine.setFunctionSections(true); targetMachine.setDataSections(true); targetMachine.getOptions().setNoFramePointerElim(true); output.reset(); targetMachine.emit(module, output, CodeGenFileType.AssemblyFile); module.dispose(); context.dispose(); byte[] asm = output.toByteArray(); output.reset(); asm = output.toByteArray(); BufferedOutputStream oOut = new BufferedOutputStream(new FileOutputStream(oFile)); targetMachine.assemble(asm, clazz.getCl...
2007 Jan 22
2
[LLVMdev] addPassesToEmit(Whole)File changes?
...lder versions to see if that will work, but of course I will need to get it to work with the newest llvm version at some point. Any pointers? Thanks! Marcel This is my current code: -(void)dumpAssemblerToFile:(NSString*)filename { TargetMachine::CodeGenFileType FileType = TargetMachine::AssemblyFile; std::string err1; Module *M=(Module*)module; const TargetMachineRegistry::Entry* entry= TargetMachineRegistry::getClosestStaticTargetForModule( *M, err1 ); TargetMachine &target=*entry->CtorFn( *M, "" ); [self generateMethodLists]; std::ostream *outStream = 0; PassManage...
2005 Aug 01
2
[LLVMdev] [patch] gccld not passing -export-dynamic to gcc for link
...-u -r1.102 gccld.cpp --- tools/gccld/gccld.cpp 8 Jul 2005 03:08:58 -0000 1.102 +++ tools/gccld/gccld.cpp 1 Aug 2005 22:06:26 -0000 @@ -308,8 +308,8 @@ Verbose); if (Verbose) std::cout << "Generating Native Code\n"; GenerateNative(OutputFilename, AssemblyFile.toString(), - LibPaths, Libraries, gcc, envp, LinkAsLibrary, RPath, - SOName, Verbose); + LibPaths, Libraries, gcc, envp, LinkAsLibrary, + NoInternalize, RPath, SOName, Verbose); if (!SaveTemps) { // Remove the asse...
2009 Mar 17
0
[LLVMdev] Printing x86 ASM for Function
Dear Maxime, Nyx wrote: > Hello, > > I would like to know how to go about printing the x86 assembly output for a > compiled function (I'm using the JIT). I saw there is a X86IntelAsmPrinter > on doxygen. However, it takes several arguments I don't know how to fill in. > Is there a helper function to create such a pass? Once I have the pass > created, do I just add it
2007 Jan 22
0
[LLVMdev] addPassesToEmit(Whole)File changes?
...lder versions to see if that will work, but of course I will need to get it to work with the newest llvm version at some point. Any pointers? Thanks! Marcel This is my current code: -(void)dumpAssemblerToFile:(NSString*)filename { TargetMachine::CodeGenFileType FileType = TargetMachine::AssemblyFile; std::string err1; Module *M=(Module*)module; const TargetMachineRegistry::Entry* entry= TargetMachineRegistry::getClosestStaticTargetForModule( *M, err1 ); TargetMachine &target=*entry->CtorFn( *M, "" ); [self generateMethodLists]; std::ostream *outStream = 0; PassManage...
2007 Nov 08
3
[LLVMdev] Newbie JITter
...mp;& "Could not allocate target machine!"); FunctionPassManager Passes(new ExistingModuleProvider(M)); Passes.add(new TargetData(*target->getTargetData())); Passes.add(createVerifierPass()); switch (target->addPassesToEmitFile(Passes, std::cout, TargetMachine::AssemblyFile, false)) { default: assert(0 && "Invalid file model!"); return 1; case FileModel::MachOFile: case FileModel::ElfFile: case FileModel::Error: std::cerr << "target does not support generation of this file type!\n"; return 1; case File...
2009 Mar 16
2
[LLVMdev] Printing x86 ASM for Function
Hello, I would like to know how to go about printing the x86 assembly output for a compiled function (I'm using the JIT). I saw there is a X86IntelAsmPrinter on doxygen. However, it takes several arguments I don't know how to fill in. Is there a helper function to create such a pass? Once I have the pass created, do I just add it to a FunctionPassManager? Thank you for your time, -
2005 Aug 02
0
[LLVMdev] [patch] gccld not passing -export-dynamic to gcc for link
...-u -r1.102 gccld.cpp --- tools/gccld/gccld.cpp 8 Jul 2005 03:08:58 -0000 1.102 +++ tools/gccld/gccld.cpp 2 Aug 2005 04:11:11 -0000 @@ -308,8 +308,8 @@ Verbose); if (Verbose) std::cout << "Generating Native Code\n"; GenerateNative(OutputFilename, AssemblyFile.toString(), - LibPaths, Libraries, gcc, envp, LinkAsLibrary, RPath, - SOName, Verbose); + LibPaths, Libraries, gcc, envp, LinkAsLibrary, + NoInternalize, RPath, SOName, Verbose); if (!SaveTemps) { // R...
2007 Jan 22
0
[LLVMdev] addPassesToEmit(Whole)File changes?
...l()) Passes.run(*I); Passes.doFinalization(); The doInitialization/doFinalization methods handle the global data. -Chris > This is my current code: > > -(void)dumpAssemblerToFile:(NSString*)filename > { > TargetMachine::CodeGenFileType FileType = TargetMachine::AssemblyFile; > std::string err1; > Module *M=(Module*)module; > const TargetMachineRegistry::Entry* entry= > TargetMachineRegistry::getClosestStaticTargetForModule( *M, err1 ); > TargetMachine &target=*entry->CtorFn( *M, "" ); > [self generateMethodLists]; > std::os...
2007 Nov 09
0
[LLVMdev] Newbie JITter
...et machine!"); > > FunctionPassManager Passes(new ExistingModuleProvider(M)); > Passes.add(new TargetData(*target->getTargetData())); > > Passes.add(createVerifierPass()); > > switch (target->addPassesToEmitFile(Passes, std::cout, > TargetMachine::AssemblyFile, false)) { > default: > assert(0 && "Invalid file model!"); > return 1; > case FileModel::MachOFile: > case FileModel::ElfFile: > case FileModel::Error: > std::cerr << "target does not support generation of this file > typ...
2007 Jul 05
2
[LLVMdev] PATCH (rest of code changes) "bytecode" --> "bitcode"
Here is the bulk of the sanitizing. My residual doubts center around the question whether we still do/want to support (un)compressed *byte*code in 2.0/2.1. I need a definitive word on this to proceed. My understanding is that bytecode is already gone, but there are still some functions/enums that really deal with *byte*code (instead of *bit*code). I did not touch those areas, so the attached