https://codereview.chromium.org/21123008/diff/1/src/x64/macro-assembler-x64.h
File src/x64/macro-assembler-x64.h (right):

https://codereview.chromium.org/21123008/diff/1/src/x64/macro-assembler-x64.h#newcode1525
src/x64/macro-assembler-x64.h:1525: return Operand(rsp, disp +
kPCOnStackSize - kPointerSize);
I have thought about this. I did not use it as index actually is counted
from stack pointer, not from argument0. The reader might think
StackOperandForArgument(index) is accessing the ith argument.

How about defining this function as:
inline Operand StackOperandForReversedArgument(int index) {
  return Operand(rsp, (index * kPointerSize) + kPCOnStackSize);
}
Index is counted from the argument n (rsp + kPCOnStackSize), instead of
argument 0 or rsp. If we want it from argument 0, we might need two
arguments (one index, one argc).

inline Operand StackOperandForReceiver(int argc) {
  return StackOperandForReversedArgument(argc);
}

If you are OK with this, I will start updating the codes to use this
interface.

https://codereview.chromium.org/21123008/

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to