[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Pnet-developers] runtime/verifier questions again
From: |
Rhys Weatherley |
Subject: |
Re: [Pnet-developers] runtime/verifier questions again |
Date: |
Wed, 11 Aug 2004 07:27:02 +1000 |
User-agent: |
KMail/1.4.3 |
On Tuesday 10 August 2004 10:04 pm, Andre 'Ilu' Seidelt wrote:
> It seems the values are stored different depending on
> their usage (calculation/local variable/parameter).
Calculations on floating-point values are always performed using
ILNativeFloat, as per the ECMA spec. Local variables are stored as ILFloat
or ILDouble, and converted to/from ILNativeFloat during calculations.
Method parameters are pushed as ILNativeFloat, and then down-converted to
either ILFloat or ILDouble inside the method ("ffixup" and "dfixup"
instructions in CVM take care of this).
> Are there 'rules' how values are stored on the stack for
> the Execution-, the Parameter- and the LocalVariableStack?
See "CVMEntryAllocArgs" and "CVMEntryAllocLocals" in "cvmc_setup.c" for the
details on how the method frame is laid out.
> I think this means the following:
> <15> : The instance of 'Test' used by firstMethod as this
> <14> : lower int border
> <13> : seems to be an ILFloat (local variable of firstMethod)
> <12-11> : seems to be an ILDouble ( "" )
> <10> : upper int border
> <09> : The instance of 'Test' param to OtherCall as this
> <08> : lower int border
> <07-05> : what is this? an ILNativeFloat?
> <05-02> : what is this? an ILNativeFloat?
> <01> : upper int border
>
> The values in <02> and <05> look like pointers to something?
They are ILNativeFloat values, as you surmised. On x86, ILNativeFloat values
occupy 12 bytes, or 3 stack words.
Cheers,
Rhys.