LGTM
http://codereview.chromium.org/6576030/diff/1/src/x64/lithium-codegen-x64.cc File src/x64/lithium-codegen-x64.cc (right): http://codereview.chromium.org/6576030/diff/1/src/x64/lithium-codegen-x64.cc#newcode2333 src/x64/lithium-codegen-x64.cc:2333: __ negl(input_reg); If you want to avoid the jumps, you can do: movl(kScratchRegister, input_reg); asrl(kScratchRegister, 31); xorl(input_reg, kScratchRegister); subl(inpt_reg, kScratchRegister); DeoptimizeIf(negative, ...). On the other hand, it's probably not any faster than using negl. http://codereview.chromium.org/6576030/diff/1/src/x64/lithium-codegen-x64.cc#newcode2334 src/x64/lithium-codegen-x64.cc:2334: __ testl(input_reg, input_reg); The negl instruction sets the sign flag, so you can omit the testl. http://codereview.chromium.org/6576030/diff/1/src/x64/lithium-codegen-x64.cc#newcode2358 src/x64/lithium-codegen-x64.cc:2358: XMMRegister scratch = xmm0; Extra space before "scratch". http://codereview.chromium.org/6576030/diff/1/src/x64/lithium-codegen-x64.cc#newcode2362 src/x64/lithium-codegen-x64.cc:2362: __ andpd(input_reg, scratch); Neat. http://codereview.chromium.org/6576030/ -- v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev
