harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pavel Pervov <pmcfi...@gmail.com>
Subject Re: A question about gen_invoke_common_managed_func
Date Tue, 17 Feb 2009 10:28:52 GMT
Hi,

Yes, exactly. This is the helper method for JNI (like Call*Method),
class loading from VM, etc.

Pavel.

On Tue, Feb 17, 2009 at 1:18 PM, YixunZhou <seanny2003@gmail.com> wrote:
> Hi,
>   Do you mean when "JIT_execute_method_default" calls
> "((RefFuncPtr)invoke_managed_func)(arg_words, argId, meth_addr);" where
> invoke_managed_func = gen_invoke_int_managed_func().
>   It executes the code pointed by meth_addr? Like C functions as follow:
>
>   push %ebp                                      -|
>   mov %ebp, %esp                             | => these are done by
> "gen_invoke_common_managed_func" ?
>   // save callee-saved registers            -|
>   meth_addr
>   pop %ebp                                       -|
>   ret                                                   -| => these are done
> by "gen_invoke_common_managed_func" ?
>
>
>
>>
>> Hi, Yixun,
>>
>> The function you've mentioned is used to produce native to managed
>> transition (i.e. the call from VM code to JITted method).
>> It uses encoder to produce assembly for N2M transition. You can find
>> encoder sources in working_vm/vm/port/src/encoder.
>>
>> Pavel.
>>
>> On Tue, Feb 17, 2009 at 11:56 AM, YixunZhou <seanny2003@gmail.com> wrote:
>>
>>>
>>> Hi all,
>>>  I have a question about gen_invoke_common_managed_func.
>>>  How does  "static char* gen_invoke_common_managed_func(char* stub)"
>>>  work?
>>>
>>>  I didn't find the implementation of function like "lea", "mov" in
>>> gen_invoke_common_managed_func. And I am confused about what function
>>> does
>>> gen_invoke_common_managed_func generate.
>>>
>>>  Thanks~
>>>
>>> --
>>>
>>> Best regard,
>>> Yixun Zhou
>>> seanny2003@gmail.com
>>>
>>>
>>>
>>>
>>
>>
>
>
> --
>
> Best regard,
> Yixun Zhou
> seanny2003@gmail.com
>
>
>

Mime
View raw message