stack slot size
gback at cs.utah.edu
Tue Mar 2 11:37:45 PST 1999
The advantage of using 8-byte slots is that you can access both
32-bit and 64-bit values using a simple array of jvalues. This
is more for simplicity than anything else.
Note that this is mainly an issue in the interpreted version.
In the jit version, Kaffe does not use 64bit slots for 32bit
values. (even when it "should", like for floats that C would
promote to a double). Other than that, it happens in the jit
version whenever the callMethod? functions are used. This
happens for JNI and some reflection invocations.
Hope that helps,
> Hello, everyone.
> I am a student interested in the JVM.
> Now, I have a question about the size of Java stack slot in Kaffe.
> In general JVMs, one slot of the Java stack takes 4 bytes.
> But, the size of a stack slot is 8-byte in Kaffe. Pushing a integer value onto the Java stack increases the Java stack pointer by 8. And data types, long and double, takes 16 bytes.
> Why is the size of a stack slot double of the required size?
> Is there any special reason to have done like that?
> Please, let me know.
> Sunghwan Kim (shift at davinci.snu.ac.kr)
More information about the kaffe