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
"
Hi,
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
"
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
Also note that the interpreter has a ton of limitations, this is just the tip of the iceberg. It is far from being production quality.
-Chris
> 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 iceberg. It is far from being production quality.
^^^^^^^^^^^^^^^^^^^^
Have those limitations been documented?
Regards,
chenwj