LGTM w/ comments.


http://codereview.chromium.org/150093/diff/1/2
File src/runtime.cc (right):

http://codereview.chromium.org/150093/diff/1/2#newcode4491
Line 4491: return result;  // Should be returned in rax and rdx, in
AMD-x64-abi.
Make comment saying that it hasn't been tested in MSVC.
Or use ifdefs using __GCC__ or __MSVC__ to not enable it.

Have you tested whether a struct also works in 32-bit mode? (I assume it
doesn't or it would have been used already).

http://codereview.chromium.org/150093/diff/1/3
File src/x64/codegen-x64.cc (right):

http://codereview.chromium.org/150093/diff/1/3#newcode5471
Line 5471: __ j(overflow, &undo);
Will this work? If rax is a smi, then 0 - rax will not overflow a 64-bit
signed subtraction.

If we have a Smi, we only need to special case zero and kMinSmiValue
(aka -0x80000000). A single testl(rax, 0x7fffffff) should be able to do
that. After that, we can just use neg(rax).

http://codereview.chromium.org/150093/diff/1/3#newcode5475
Line 5475: __ j(zero, &done);
How can it not be smi tagged if we subtract a smi tagged number from
zero?

http://codereview.chromium.org/150093

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

Reply via email to