harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mikhail Fursov" <mike.fur...@gmail.com>
Subject Re: [drlvm][magic] New Magic features proposal.
Date Tue, 23 Jan 2007 15:30:45 GMT
On 1/23/07, Xiao-Feng Li <xiaofeng.li@gmail.com> wrote:
>
>
> Based on my prior experience with M2N frame work, I have the same
> feeling that compiler instrinsic might be able to deal with fast
> native call (except some corner cases where very special calling
> convention ect. is used, e.g., the native method itself is a
> hand-written asm code sequence.)
>
> Probably the compiler instrinsic semantics can be expressed with Java
> Magics, then they are just the same thing from different viewpoints.
>
>
The problem is with usual JNI calls. JIT knows nothing about M2N frames
today. Pavel wants to encode JNI stub's body with magics and do not add any
knowledge about M2N into JIT.

So we have 2 new magics: allocateMemChunkOnStack(size) and
saveRegisters(Address, howToSave)
The problem left is EIP handling. Before making direct call JIT pushes
call's args, saves caller-save regs, so EIP changes.
When unwinding native call VM uses EIP saved in M2N frame. JIT can't find
call by this EIP and this is the problem.
I'll take a break here for a day to think more about it and read others
ideas how to deal with EIP...


-- 
Mikhail Fursov

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message