On 2013/08/23 07:41:02, Benedikt Meurer wrote:
I have had a closer look again: We really need to split this CL into
smaller
pieces, otherwise we'll either have a hard time in case we break some
corner
case with this change or we'll have to revert everything and you'll have
to
start over again.
https://codereview.chromium.org/23156006/diff/1/src/globals.h
File src/globals.h (right):
https://codereview.chromium.org/23156006/diff/1/src/globals.h#newcode170
src/globals.h:170: #define V8_BETTER_OPERAND_ON_RIGHT
On 2013/08/22 12:35:48, vincent.belliard.fr wrote:
> Once again, the code has been made for IA32 where operands only used
once
are
> better at left because operations clobber the left value.
> With ARM, we have 3 operands operations so there is no advantage to put
used
> once operands on the left.
>
> The XXXMemOperand functions could have been defined with the MemOperand
on
the
> left instead of on the right. However, it would have been not consistent
with
> other macro assembler functions.
>
> The choice of left operand is arbitrary (but this is good for IA32). We
only
put
> this define to be able to make the better choice for a CPU.
>
> It was difficult to find a good name for the define (and we can't use
the
> ARCH_ARM define directly in hydrogen-instructions.h). If you have some
> suggestions we can change the name.
I still don't see why this macro is needed at all. As you say, ARM has 3
operand
instructions, so it doesn't matter and we could as well have the better
operand
on the left there as well. What am I missing?
You are right so the better operand could be on the left. It is on the
right in
this CL only because this make the instruction more "ARM like". In ARM, for
three operands instructions the second operand is always a register, the
third
operand on the other hand is more flexible: it can be a small constant with
optional shit or a register with optional shift. So we decided to mimic this
behaviour but as you pointed out this could be changed. Let us know if you
think
a better operand on the left would be less confusing.
https://codereview.chromium.org/23156006/
--
--
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.