search for: libffi

Displaying 20 results from an estimated 181 matches for "libffi".

2015 Sep 18
2
ExecutionEngine::runFunction and libffi
I noticed that runFunction (for MCJIT) is very limited. At the same time the interpreter already has a fairly generic way of calling functions from a pointer and a Function * (for description) using libffi. Would it make sense to pull that functionality out into a small support library and using it in MCJIT? As is runFunction isn't particularly usable. -- Johannes S. Mueller-Roemer, MSc Wiss. Mitarbeiter - Interactive Engineering Technologies (IET) Fraunhofer-Institut für Graphische Datenverarb...
2010 Feb 01
0
[LLVMdev] llvm interpreter cannot execute llvm-gcc generated bitcode
...ist ap; > int z; > > va_start(ap, dummy); > while( (z = va_arg(ap, int))!=0) > { > printf("== %i ==\n", z); > } > va_end(ap); > } > > int main() > { > doTheThing(-1, 1, 2, 3, 0); > } > I think this doesn't work because libffi doesn't support vararg functions: "There is no support for calling varargs functions. This may work on some platforms, depending on how the ABI is defined, but it is not reliable." Since you are on a platform where the JIT doesn't work properly, I guess libffi's varargs don&...
2010 Jan 01
1
[LLVMdev] How does JIT/lli work with bc file?
Hi Eli, I think the llvm configure has already configured with ffi. ../llvm-2.6/configure -help | grep ffi --enable-libffi Check for the presence of libffi (default is YES) In addition, the printf() can work in program, reflecting that libffi is working, right? How can I make Interpreter work with getpid(), fork(), and clone()? On Thu, Dec 31, 2009 at 2:33 AM, Eli Friedman <eli.friedman at gmail.c...
2010 Feb 26
1
[LLVMdev] lli --force-interpreter does not find external function
...i'm getting the following error-message: LLVM ERROR: Tried to execute an unknown external function: i8* (i32)* malloc My program is calling malloc. If I omit --force-interpreter everything runs as expected. Compiling to Assembler also works without problems. I have compiled LLVM with --enable-libffi. What am I doing wrong here? Regards, Sebastian
2009 Nov 16
3
[LLVMdev] lli -force-interpreter complains about external function
Nick Lewycky <nicholas at mxc.ca> writes: > The interpreter uses libffi to make external function calls. However, it > needs to be detected at LLVM's compile time. If you're using the > released packages, we disabled that because we were worried about users > who don't have libffi installed. This seems to be quite a common problem (I too hit it...
2014 Nov 20
3
[LLVMdev] Proposal: add Go frontend subproject based on llgo
...ov 19, 2014 at 01:53:17PM -0800, Peter Collingbourne wrote: > > llgo depends on certain third-party components, namely a copy of the Go > > standard library (libgo), a Go program analysis library (go.tools) and two > > library dependencies of the standard library (libbacktrace and libffi). > > I think providing a better alternative to libffi is already a goal of > some people, but what is libbacktrace needed for? What is not provided > by the Itanium Unwind ABI? According to the libbacktrace readme file: > As of September 2012, libbacktrace only supports ELF execu...
2009 Nov 18
2
[LLVMdev] lli -force-interpreter complains about external function
Hi Nick: Thanks for pointing me to libffi. Recompile LLVM with libffi does solve the problem of printf. But it still has other problems: 1) sinf() returns 0 in the interpreter, but returns correct value in JIT (see hellosin.c) 2) calling pthread_create cause lli to crash in the interpreter mode, but no problem in JIT (see phello.c). My qu...
2011 Jun 15
2
[LLVMdev] LLVM interpreter does not support fmod
It seems llvm interpreter only supports a limited number of external functions. fmod, in particular is not supported. any reason why it is not supported ? "lli -force-interpreter test.bc LLVM ERROR: Tried to execute an unknown external function: double (double, double)* fmod " -- Kind Regards Xin Tong -------------- next part -------------- An HTML attachment was scrubbed... URL:
2011 Jun 15
0
[LLVMdev] LLVM interpreter does not support fmod
...M ERROR: Tried to execute an unknown external function: double (double, > double)* fmod > " You can check out the comments in lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp to see how LLVM interpreter handle external functions. "... If such a wrapper does not exist, and libffi is available, then the Interpreter will attempt to invoke the function using libffi, after finding its address." I guess you have to configure LLVM with "--enable-libffi" option. HTH. Regards, chenwj -- Wei-Ren Chen (陳韋任) Computer Systems Lab, Institute of Information Scie...
2011 Jun 15
1
[LLVMdev] LLVM interpreter does not support fmod
...known external function: double (double, >> double)* fmod >> " > > You can check out the comments in lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp > to see how LLVM interpreter handle external functions. > > "... If such a wrapper does not exist, and libffi is available, then the Interpreter will > attempt to invoke the function using libffi, after finding its address." > > I guess you have to configure LLVM with "--enable-libffi" option. Also note that the interpreter has a ton of limitations, this is just the tip of the...
2012 Feb 23
2
[LLVMdev] x86-64 sign extension for parameters and return values
...; Nobody has actually noticed any issues with this before now, as far as > I know. The only reason that I noticed was that Python ctypes started misbehaving when we went to build/test it on OS X Lion (http://bugs.python.org/issue13370). After investigating the failure I found this. Python uses libffi and libffi implements the GCC ABI. So I would expect any project using libffi with clang to have problems. > If gcc has decided to assume no sign/zero-extension on x86-64, we need > to follow their lead, at least on Linux. Please file at > http://llvm.org/bugs/ ; an executable testcase t...
2010 Feb 01
2
[LLVMdev] llvm interpreter cannot execute llvm-gcc generated bitcode
Hello again! We have fetched the latest llvm sources from repository and the original problem has went away. Though now we are facing a new problem with interpreter on the following c code: -------------- #include <stdarg.h> #include <stdio.h> void doTheThing(int dummy, ...) { va_list ap; int z; va_start(ap, dummy); while( (z = va_arg(ap, int))!=0) { printf("==
2012 May 14
2
[LLVMdev] MCJIT
...inline asm (say load) and report failure and die. > > If you're hitting that code, you're running the old JIT (which does indeed not support inline assembly), not the MCJIT. > Do I need to enable anything at configure, my configure looks like this: > ../llvm/configure --enable-libffi --enable-targets=host-only --prefix=/local/mnt/workspace/ashoknn/crd/neo/llvm/proto/llvmsvn/build/bin I added the enable-libffi when trying to figure out resolving external libs. thanks, ashok
2012 May 14
2
[LLVMdev] MCJIT
...; >>> >>> If you're hitting that code, you're running the old JIT (which does indeed not support inline assembly), not the MCJIT. >>> >> >> Do I need to enable anything at configure, my configure looks like this: >>> ../llvm/configure --enable-libffi --enable-targets=host-only --prefix=/local/mnt/workspace/ashoknn/crd/neo/llvm/proto/llvmsvn/build/bin >> >> I added the enable-libffi when trying to figure out resolving external libs. >> > > > No, selecting MCJIT vs. the old JIT is done in the EngineBuilder. If you'r...
2009 Nov 17
0
[LLVMdev] lli -force-interpreter complains about external function
Timo Juhani Lindfors wrote: > Nick Lewycky<nicholas at mxc.ca> writes: >> The interpreter uses libffi to make external function calls. However, it >> needs to be detected at LLVM's compile time. If you're using the >> released packages, we disabled that because we were worried about users >> who don't have libffi installed. > > This seems to be quite a common pro...
2009 Nov 18
0
[LLVMdev] lli -force-interpreter complains about external function
...ing "invalid ELF header" error when calling llvm-ld with -lpthread, please change the load module from /usr/lib/pthread.a to /lib/libpthread.so.0. Thanks Xu On Wed, Nov 18, 2009 at 12:02 AM, Xu Yang <yangx2000 at gmail.com> wrote: > Hi Nick: > > Thanks for pointing me to libffi. > Recompile LLVM with libffi does solve the problem of printf. > But it still has other problems: > 1) sinf() returns 0 in the interpreter, but returns correct value in JIT > (see hellosin.c) > 2) calling pthread_create cause lli to crash in the interpreter mode, but > no problem...
2009 Dec 31
0
[LLVMdev] How does JIT/lli work with bc file?
...26 AM, Heming Cui <heming at cs.columbia.edu> wrote: > Hi Eli, >     Thanks for your reply. If I add -force-interpreter to lli, then it seems > that it can not run external function like printf or malloc. Is there any > easy way to solve this problem? Does the LLVM configure find libffi? -Eli
2009 Dec 31
2
[LLVMdev] How does JIT/lli work with bc file?
Hi Eli, Thanks for your reply. If I add -force-interpreter to lli, then it seems that it can not run external function like printf or malloc. Is there any easy way to solve this problem? On Wed, Dec 30, 2009 at 11:26 PM, Eli Friedman <eli.friedman at gmail.com>wrote: > On Wed, Dec 30, 2009 at 7:53 PM, Heming Cui <heming at cs.columbia.edu> > wrote: > > Dear all, >
2009 Nov 16
0
[LLVMdev] lli -force-interpreter complains about external function
...ried to execute an unknown external function: i32 (i8*)* puts > > I think the error is because C library is not being linked with the byte > code, but I was not able to find any helpful instruction in lli's document. > > Can you please teach me how to do it? The interpreter uses libffi to make external function calls. However, it needs to be detected at LLVM's compile time. If you're using the released packages, we disabled that because we were worried about users who don't have libffi installed. In short, install libffi and rebuild LLVM. Nick > Thanks > X...
2009 Nov 18
3
[LLVMdev] lli -force-interpreter complains about external function
...e change the load module from /usr/lib/pthread.a to > /lib/libpthread.so.0. > > Thanks > Xu > > On Wed, Nov 18, 2009 at 12:02 AM, Xu Yang <yangx2000 at gmail.com > <mailto:yangx2000 at gmail.com>> wrote: > > Hi Nick: > > Thanks for pointing me to libffi. > Recompile LLVM with libffi does solve the problem of printf. > But it still has other problems: > 1) sinf() returns 0 in the interpreter, but returns correct value in > JIT (see hellosin.c) > 2) calling pthread_create cause lli to crash in the interpreter >...