PPC: Fix '[strong] Disallow implicit conversions for comparison'
authormbrandy <mbrandy@us.ibm.com>
Tue, 12 May 2015 16:48:16 +0000 (09:48 -0700)
committerCommit bot <commit-bot@chromium.org>
Tue, 12 May 2015 16:48:14 +0000 (16:48 +0000)
Do not trash type register in kIsNotStringMask test.

R=conradw@chromium.org, dstence@us.ibm.com, michael_dawson@ca.ibm.com
BUG=

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

Cr-Commit-Position: refs/heads/master@{#28375}

src/ppc/code-stubs-ppc.cc

index e4b3119..42e9539 100644 (file)
@@ -271,7 +271,7 @@ static void EmitIdenticalObjectComparison(MacroAssembler* masm, Label* slow,
       // we need to throw a TypeError. Smis have already been ruled out.
       __ cmpi(r7, Operand(HEAP_NUMBER_TYPE));
       __ beq(&return_equal);
-      __ andi(r7, r7, Operand(kIsNotStringMask));
+      __ andi(r0, r7, Operand(kIsNotStringMask));
       __ bne(slow, cr0);
     }
   } else {
@@ -288,7 +288,7 @@ static void EmitIdenticalObjectComparison(MacroAssembler* masm, Label* slow,
         // Call the runtime on anything that is converted in the semantics,
         // since we need to throw a TypeError. Smis and heap numbers have
         // already been ruled out.
-        __ andi(r7, r7, Operand(kIsNotStringMask));
+        __ andi(r0, r7, Operand(kIsNotStringMask));
         __ bne(slow, cr0);
       }
       // Normally here we fall through to return_equal, but undefined is