hi serya,
Most of the comments are addressed. Could you please take another look.

Thanks


http://codereview.chromium.org/6170001/diff/60001/src/arm/macro-assembler-arm.cc
File src/arm/macro-assembler-arm.cc (right):

http://codereview.chromium.org/6170001/diff/60001/src/arm/macro-assembler-arm.cc#newcode1464
src/arm/macro-assembler-arm.cc:1464: int frame_alignment =
ActivationFrameAlignment();
On 2011/01/20 15:18:47, SeRya wrote:
On 2011/01/20 13:23:51, zaheer wrote:
> On 2011/01/20 12:09:28, SeRya wrote:
> > Currently CEntryStub stack layout is following:
> > <caller stack frame>
> > <stack alignment place holder initialized by 0?>
> > <caller frame pointer>
> > <caller stack pointer after unwinding>
> > <return address>
> > <code object>
> > <return address to the stub or 0-marker>
> > <fp state?>
> >
> > Your layout:
> > <caller stack frame>
> > <caller frame pointer>
> > <caller stack pointer after unwinding>
> > <1-marker>
> > <pointer to the return address>
> > <stack alignment uninitialized place holder?>
> > <return address>
> > <code object>
> > <return address>
> Explaining the issue below, my layout in bit more detail
> <caller stack frame>
> <return address>
> <caller stack pointer after unwinding>
> <caller frame pointer>
> <code object> <-- centry sp, cant use the same in current case
> <marker>
> <exit frame sp>
> .
> .
> <arguments>
> .
> .
> <stack alignment>
the placeholder above arguments.
> <return address>
> <native call stack>
>
> I cannot completely reuse the exit frame layout since arguments come
in
between
> exit frame and the native entry and hence the need to put additional
slot
> (marker/stack) to point to return address.
>
> If you already considered the above issue, maybe i miss your point.

Sorry, I forget about the arguments. But it's possible anyway to come
to the
compatible layout. In contrast with ia32/x64 return address don't
forced to be
on top of the stack. Lets put in in a fixed place instead of stack
top:
Thanks. it does simplify it a lot.

1. Reserve room for the return address where it's expected to be in
CEntryStub
(just before arguments): sub(sp, sp, Operand((arg_stack_space + 1) *
kPointerSize));
(for now there is the marker at this place, so it is not needed)
2. Don't push the return address, put it to that place:
   add(ip, pc, Operand(4));
   str(ip, MemOperand(fp, ExitFrameConstants::kSPOffset));
   Jump(r2);  // Call the api function.
Done
3. In DirectCEntryStub::Generate use this slot to get real return
address:
   ldr(ip, MemOperand(fp, ExitFrameConstants::kSPOffset));
could you pls check, code object is stored at sp offset, i have
introduced a new constant kPCOffset which points to fp -2

http://codereview.chromium.org/6170001/

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to