On 2010/09/27 14:56:59, Vitaly wrote:
http://codereview.chromium.org/3446024/diff/11001/12001#newcode1699
src/arm/stub-cache-arm.cc:1699: __ sub(r0, r0, r1);
On 2010/09/27 14:17:23, Rodolph Perfetta wrote:
> Also wouldn't the sequence:
> cmp r0, #0
> rsbmis r0, r0, #0
> bmi slow
> be better for an integer abs (or did I miss a smi corner case?)
I changed the current approach to only use two instructions. You are very
much
welcome to send me a patch with your approach if you think it's better.
The rewritten sequence is as good as mine, this is just a matter of personal
preference now.
http://codereview.chromium.org/3446024/diff/11001/12001#newcode1720
src/arm/stub-cache-arm.cc:1720: __ tst(r1, r3);
On 2010/09/27 14:17:23, Rodolph Perfetta wrote:
> merge the mov with the tst: tst(r1, Operand(HeapNumber::kSignMask)).
>
> You will need to do the same for the eor further down.
Will the constant fit into the instruction? I was afraid of using the
constant
pool more than necessary, but maybe it's not an issue.
V8 assembler is quite smart and can cope with any constant. Obviously
constant
out of range will incur more code.
HeapNumber::kSignMask is 0x80000000u and this will fit into ARM
in-instructions
constant: 8bits rotated right by an even number of bits between 0 and 30.
http://codereview.chromium.org/3446024/show
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev