[x64] Match -0 - x with sign bit flip.
authorbmeurer <bmeurer@chromium.org>
Tue, 7 Apr 2015 07:34:55 +0000 (00:34 -0700)
committerCommit bot <commit-bot@chromium.org>
Tue, 7 Apr 2015 07:35:03 +0000 (07:35 +0000)
commita1b2c275b7c821d7569d247463f74968695903b4
tree9cd56360fdc674c86b8799e6dbd6161003182f75
parentee73c6f3e756ec2e67ee721761a53f60c3d544d8
[x64] Match -0 - x with sign bit flip.

We can use xorps/xorpd on Intel CPUs to flip the sign bit. Ideally we'd
use a RIP-relative 128-bit constant in the code object, as OCaml/GCC
does, however that requires 128-bit alignment for code objects, which is
not yet implemented. So for now we materialize the mask inline.

R=dcarney@chromium.org

Review URL: https://codereview.chromium.org/1046893002

Cr-Commit-Position: refs/heads/master@{#27611}
src/compiler/x64/code-generator-x64.cc
src/compiler/x64/instruction-codes-x64.h
src/compiler/x64/instruction-selector-x64.cc
test/cctest/compiler/test-run-machops.cc
test/unittests/compiler/x64/instruction-selector-x64-unittest.cc