[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Libjit-developers] Clobbered stack for jit-interp.c
From: |
Gopal V |
Subject: |
[Libjit-developers] Clobbered stack for jit-interp.c |
Date: |
Fri, 04 Aug 2006 02:02:08 +0530 |
User-agent: |
Thunderbird 1.5.0.2 (X11/20060521) |
Hi,
I'm hoping somebody can tell me how to even debug this. The return value
from all external functions are being clobbered back to zero by the jit
interp engine. This is the constructor for the [oSystem.String; required
for the engine to setup the String[] args for Main().
function $Synthetic.$164..ctor(i1 : ptr, i2 : int) : ptr
...
push_int(i2)
push_int(i1)
push_return_area_ptr
.L2:
call_external $Synthetic.$164..ctor (0x0806e828)
pop_stack(2)
return_reg(i9, r0)
....
call_external jit_exception_clear_last (0x0804c8d8)
throw(i18)
ends_in_dead
.L1:
return_int(i9)
ends_in_dead
end
Which seems to mysteriously generate the following opcodes
function $Synthetic.$164..ctor(ptr, int) : ptr
...
55B3D048: ldarg_int 1
55B3D050: ldarg_int 0
55B3D058: push_return_area_ptr
55B3D05C: call_external 0x806E828, 2
55B3D06C: pop_2
55B3D070: push_return_int
...
55B3D0F8: call_external 0x804C8D8, 0
55B3D108: ldloc_int 1
55B3D110: throw
55B3D114: ldloc_int 0
55B3D11C: return_int
end
Now the inexplicable part is the ldloc_int 0. From what I can
figure out from gdb, it looks as though I should be popping
a value out to achieve the same stack height as it was when
the push_return_int was called for i9 ? Anyway, the return is
just a zero from the ldloc value.
Is it that load_value can handle only constants and local
variables ?
Cheers,
Gopal
- [Libjit-developers] Clobbered stack for jit-interp.c,
Gopal V <=