Reviewers: Jakob,

Description:
X64: Fix bug in minus-zero check after int32 multiplication.

In optimized x64 code, the check for minus zero after multiplication
used the wrong size bit-or instruction (64-bit instead of 32-bit).

TEST=mjsunit/numops-fuzz.js

Please review this at https://chromiumcodereview.appspot.com/9316127/

SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/

Affected files:
  M     src/x64/lithium-codegen-x64.cc


Index: src/x64/lithium-codegen-x64.cc
===================================================================
--- src/x64/lithium-codegen-x64.cc      (revision 10599)
+++ src/x64/lithium-codegen-x64.cc      (working copy)
@@ -993,11 +993,11 @@
         DeoptimizeIf(no_condition, instr->environment());
       }
     } else if (right->IsStackSlot()) {
-      __ or_(kScratchRegister, ToOperand(right));
+      __ orl(kScratchRegister, ToOperand(right));
       DeoptimizeIf(sign, instr->environment());
     } else {
       // Test the non-zero operand for negative sign.
-      __ or_(kScratchRegister, ToRegister(right));
+      __ orl(kScratchRegister, ToRegister(right));
       DeoptimizeIf(sign, instr->environment());
     }
     __ bind(&done);


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

Reply via email to