stack frames
Hiroshi Yamauchi
yamauchi at google.com
Fri Aug 14 16:51:49 PDT 2009
Hi Tom,
For C1, I found a picture in c1_FrameMap.hpp:
// stack grow direction -->
SP
// +----------+---+----------+-------+------------------------+-----+
// |arguments | x | monitors | spill | reserved argument area | ABI |
// +----------+---+----------+-------+------------------------+-----+
//
// x = ABI area (SPARC) or return adress and link (i486)
// ABI = ABI area (SPARC) or nothing (i486)
Is that basically the same as what you described for C2 frames (i.e.
do C1 and C2 have the same stack frame layout after all)?
On x86, are the arguments passed via stack like the C calling
convention (and how about floating point values)?
Does a C2 frame have 'sender sp' as frame_x86.hpp says:
public:
enum {
pc_return_offset = 0,
// All frames
link_offset = 0,
return_addr_offset = 1,
// non-interpreter frames
sender_sp_offset = 2,
or is it cruft?
Also, if 'adapter frames' exist (eg from compiled -> interpreted and
vice versa), what do they look like?
Thanks,
Hiroshi
On Fri, Aug 14, 2009 at 3:49 PM, Tom Rodriguez<Thomas.Rodriguez at sun.com> wrote:
> I don't know that there's a specification of compiled frames anywhere. We
> generally use standard call and return sequences and construct our frames
> following the platform ABI, though on x86 we don't maintain ebp as the frame
> pointer but treat it as callee saved and store it in the standard place and
> use no other callee saved registers. The frame contains monitor records,
> spill slots and the outgoing argument area in that order. I think that's
> about the extent of what's specified. matcher.cpp contains all the frame
> layout logic for c2.
>
> tom
>
> On Aug 14, 2009, at 1:48 PM, Chuck Rasbold wrote:
>
>> A colleague asked me for a specification of HotSpot (actually, C2) stack
>> frames.
>>
>> My JVM skills are a little rusty, and I realize that my knowledge is based
>> more on experience, rather than a spec.
>>
>> Where are the most authoritative descriptions of the frame layout in
>> HotSpot? Even if there is not one in the code, is there one in John Rose's
>> HotSpot internals wiki?
>>
>> -- Chuck
>
>
More information about the hotspot-compiler-dev
mailing list