Displaying 4 results from an estimated 4 matches for "__z4get5v".
2007 Jun 12
0
[LLVMdev] How to call native functions from bytecode run in JIT?
...ld find it an do the right thing. This is how it finds
> printf and
> a variety of other things. You don't need to call addGlobalMapping at
> all.
Looking at the output of "nm codegen1" I realized that "get5" was a C+
+ function whose name was mangled to "__Z4get5v". Surrounding it by
extern "C" helped a lot :) Now the function is found by the JIT and I
can call it using EE->runFunction als well as using a CallInst.
> Does this work?
However, one strange effet remains: if I first call the function
using EE->runFunction and then...
2007 Jun 12
3
[LLVMdev] How to call native functions from bytecode run in JIT?
On Tue, 12 Jun 2007, Jan Rehders wrote:
>> Jan, how are you doing this? Are you creating an external LLVM
>> Function object named "get5", then using EE::addGlobalMapping? If
>> 'get5' exists in the address space, why not just let the JIT resolve it
>> (which will then create the stub)?
>
> Yes. I create a Function with matching signature,
2007 Jun 13
5
[LLVMdev] How to call native functions from bytecode run in JIT?
...This is how it finds
>> printf and
>> a variety of other things. You don't need to call
>> addGlobalMapping at
>> all.
>
> Looking at the output of "nm codegen1" I realized that "get5" was a C+
> + function whose name was mangled to "__Z4get5v". Surrounding it by
> extern "C" helped a lot :) Now the function is found by the JIT and I
> can call it using EE->runFunction als well as using a CallInst.
>
>> Does this work?
>
> However, one strange effet remains: if I first call the function
> using E...
2007 Jun 14
0
[LLVMdev] How to call native functions from bytecode run in JIT?
...tf and
>>> a variety of other things. You don't need to call
>>> addGlobalMapping at
>>> all.
>>>
>> Looking at the output of "nm codegen1" I realized that "get5" was a C+
>> + function whose name was mangled to "__Z4get5v". Surrounding it by
>> extern "C" helped a lot :) Now the function is found by the JIT and I
>> can call it using EE->runFunction als well as using a CallInst.
>>
>>
>>> Does this work?
>>>
>> However, one strange effet r...