Some comments on Push/Pop argument order.

https://codereview.chromium.org/169533002/diff/1/src/a64/macro-assembler-a64.cc
File src/a64/macro-assembler-a64.cc (right):

https://codereview.chromium.org/169533002/diff/1/src/a64/macro-assembler-a64.cc#newcode651
src/a64/macro-assembler-a64.cc:651: void
MacroAssembler::PushPopQueue::PopQueued() {
If I read this right, doing the following would not work:

PushPopQueue queue;
queue.Queue(x0);
queue.Queue(x1);

queue.PushQueued();

... Call function

queue.PopQueued();

Both because PushQueued() and PopQueued clear the queued_ field, and
because the arguments to Pop would need to be given in the reverse order
as given to Push. Would it be worth enabling this - it could save a load
of boilerplate.  (Note: I found it quite confusing that on arm you do
Push(r0, r1), Pop(r0, r1), but on a64 the Pop is reversed, e.g.,:
Push(x0, x1), Pop(x1, x0) - could we unify this to be the same as Arm?)

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

https://codereview.chromium.org/169533002/diff/1/src/a64/macro-assembler-a64.h#newcode2040
src/a64/macro-assembler-a64.h:2040: void PrepareForPush(int count, int
size) { PrepareForPush(count * size); }
nit - restore the comment for these methods that:
// Note that size is per register, and is specified in bytes.

https://codereview.chromium.org/169533002/

--
--
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