search for: parseassemblyfil

Displaying 12 results from an estimated 12 matches for "parseassemblyfil".

Did you mean: parseassemblyfile
2004 May 11
1
[LLVMdev] Follow-up on: Dynamic updates of current executed code
...ee llvm/lib/ExecutionEngine/ExecutionEngine.cpp . It will compile >the given Function* to machine code, and return a pointer to you. In >your LLVM code, you will have to first cast your function pointer before >storing it, but it should work as you have it. 1) Can a modified version of ParseAssemblyFile(InputFilename) that takes a pointer to LLVM code in memory instead be used to generate a Function* for use by the getPointerToGlobal()? I understand that it currently returns a Module*. Is it possible to make it return an F* instead, and if so how would the implementation roughly look like? 2) C...
2009 Jul 20
1
[LLVMdev] Got a "corrupted double-linked list" error?
...inked list" error when "my llvm-as" works,however,when I do nothing on the disassembled bitcode file,everything is OK, After debugged,I found the error line is "MemoryBuffer *F = MemoryBuffer::getFileOrSTDIN(Filename.c_str(), &ErrorStr);" in the "Module *llvm::ParseAssemblyFile(const std::string &Filename, SMDiagnostic &Err,LLVMContext &Context)" function, I don't know the reason,anyone once got the similar trouble? Thanks
2011 Feb 04
1
[LLVMdev] PareAssemblyFile returning "expected top-level entity" error message
Hello all, I am trying to generate a module object using something like this: (to use for code analysis) Module *topModule; SMDiagnostic error; topModule = ParseAssemblyFile("code.s", error, getGlobalContext()); displayErrorInfo(error); void displayErrorInfo(SMDiagnostic& err) { std::string errFileName = err.getFilename(); std::string errMsg = err.getMessage(); std::string errLineContents = err.getLineContents(); int errLineNo = err....
2007 Jul 09
2
[LLVMdev] AsmParser fails
...) ; <i32> [#uses=1] %tmp1 = sub i32 %tmp, 7 ; <i32> [#uses=1] %tmp2 = call i32 @common_func2( i32 %tmp1 ) ; <i32> [#uses=1] store i32 %tmp2, i32* %ret br label %return return: ; preds = %entry ret void } - when I now want to parse this file using the AsmParser via llvm::ParseAssemblyFile my program crashes with the following error message: /usr/include/c++/4.1.2/debug/vector:192:error: attempt to subscript container with out-of-bounds index 0, but container only holds 0 elements. Objects involved in the operation: sequence "this" @ 0x0xbf848814 { type = N15__...
2004 Dec 30
0
[LLVMdev] Primer with LLVM
...ompilation) and execute it. Since the bulk of the implementation of these tools is in the LLVM libraries, you can create your own process to do the same sorts of things. I'm not quite sure what you mean by "scripts (char*)" but if you mean LLVM assembly then this is possible to. The ParseAssemblyFile function (include/llvm/Assembly/Parser.h) can be used to turn an LLVM assembly into a Module* which is then suitable for linking via the linker interface (include/llvm/Linker.h). > > Can I invoke externals functions from a guest (LLVM generated) code which > exist in the host code (the...
2013 Aug 14
1
[LLVMdev] Reading .ll file to get its CFG
Hi All, Could I read .ll file as module to get its functions in ModulePass could it be like readModuleFromFile(M.ll) or whatever? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130814/0d549b75/attachment.html>
2006 Dec 09
2
[LLVMdev] jit with external functions
I have an application that is generating llvm assembler text files, these are then loaded with ParseAssemblyFile. I am also using ExecutionEngine::runFunction to call functions in the loaded/created modules. Can I place references to external functions in the assembler files? For example I if my application has a function called fred() I would like to place calls to fred in the assembler text file. Can I do...
2004 Dec 30
3
[LLVMdev] Primer with LLVM
Hi, everybody: I am a beginner with LLVM, in fact today was the first day that I use it. I have several questions about LLVM: Can I use LLVM to compile several files (bytecode), scripts (char*) and link them with external libraries generating *only* one executable (all in memory)? Can I invoke externals functions from a guest (LLVM generated) code which exist in the host code (the code that
2004 Apr 20
2
[LLVMdev] Dynamic updates of current executed code
Thanks! Problem is though, that the Ruby compiler is integrated in the compilation of the program being executed, to be able to parse & compile dynamic code at run-time. Therefore the calls to ExecutionEngine::getPointerToGlobal(F) need to be made in LLVM code. Here is a detailed simplistic example in pseudocode of what we want to do: First Ruby code is entered at run-time, received as a
2008 Apr 19
2
[LLVMdev] CodeGen fails for CallInst with label
...)[0x816e93b] llvm-as(llvm::Value::getType() const+0x14)[0x816e952] llvm-as(llvmAsmparse()+0xccc4)[0x818a14e] llvm-as[0x818c15c] llvm-as(llvm::RunVMAsmParser(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, _IO_FILE*)+0x4a)[0x818c5aa] llvm-as(llvm::ParseAssemblyFile(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, llvm::ParseError*)+0xf3)[0x8178d65] llvm-as(main+0x84)[0x815aeb6] /lib/libc.so.6(__libc_start_main+0xdc)[0x6e8dec] llvm-as(__gxx_personality_v0+0x2a9)[0x815aa81] llvm-as: llvm version 2.0 DEBUG b...
2013 May 28
2
[LLVMdev] Global variables on LLVM JIT on ARM (Android)
...64:32:64-f32:32:32-f64:32:64-v64:32:64-v128:32:128-a0:0:32-n32-S32" target triple = "armv7--" @runtime_val = global i32 7, align 4 define i32 @method() { entry: %ret = load i32* @runtime_val, align 4 ret i32 %ret } When I use getPointerToFunction() after loading this assembly with ParseAssemblyFile(), I get the following stderr output, and then a segfault: UNREACHABLE executed! Stack dump: 0. Running pass 'ARM Machine Code Emitter' on function '@method' And here's the GDB backtrace: #0 __libc_android_abort () at bionic/libc/unistd/abort.c:82 #1 0x40e35600 in llvm::ll...
2004 Dec 31
4
[LLVMdev] Primer with LLVM
...ompilation) and execute it. Since the bulk of the implementation of these tools is in the LLVM libraries, you can create your own process to do the same sorts of things. I'm not quite sure what you mean by "scripts (char*)" but if you mean LLVM assembly then this is possible to. The ParseAssemblyFile function (include/llvm/Assembly/Parser.h) can be used to turn an LLVM assembly into a Module* which is then suitable for linking via the linker interface (include/llvm/Linker.h). > > Can I invoke externals functions from a guest (LLVM generated) code which > exist in the host code (the...