Reviewers: mtbrandyberry, michael_dawson,

Description:
PPC: Debug check fix for test SMI optimization.

[email protected], [email protected]
BUG=

Please review this at https://codereview.chromium.org/1202383005/

Base URL: https://chromium.googlesource.com/v8/v8.git@master

Affected files (+5, -5 lines):
  M src/ic/ppc/ic-ppc.cc
  M src/ppc/assembler-ppc.h
  M src/ppc/assembler-ppc.cc


Index: src/ic/ppc/ic-ppc.cc
diff --git a/src/ic/ppc/ic-ppc.cc b/src/ic/ppc/ic-ppc.cc
index fdb88aee50ce57c38cdb96681b33b8cf2d602b19..0858edca34dd98dabc445702e93a2b3fc87e1a26 100644
--- a/src/ic/ppc/ic-ppc.cc
+++ b/src/ic/ppc/ic-ppc.cc
@@ -874,11 +874,7 @@ void PatchInlinedSmiCode(Address address, InlinedSmiCheck check) {
     patcher.masm()->TestIfSmi(reg, r0);
   } else {
     DCHECK(check == DISABLE_INLINED_SMI_CHECK);
-#if V8_TARGET_ARCH_PPC64
-    DCHECK(Assembler::IsRldicl(instr_at_patch));
-#else
-    DCHECK(Assembler::IsRlwinm(instr_at_patch));
-#endif
+    DCHECK(Assembler::IsAndi(instr_at_patch));
     patcher.masm()->cmp(reg, reg, cr0);
   }
   DCHECK(Assembler::IsBranch(branch_instr));
Index: src/ppc/assembler-ppc.cc
diff --git a/src/ppc/assembler-ppc.cc b/src/ppc/assembler-ppc.cc
index 38c7fd82b7bbe096725621d39a531f973491ed80..571a9fc8a2f75e6adb7adc189f5abf5583c597f7 100644
--- a/src/ppc/assembler-ppc.cc
+++ b/src/ppc/assembler-ppc.cc
@@ -337,6 +337,9 @@ bool Assembler::IsRlwinm(Instr instr) {
 }


+bool Assembler::IsAndi(Instr instr) { return ((instr & kOpcodeMask) == ANDIx); }
+
+
 #if V8_TARGET_ARCH_PPC64
 bool Assembler::IsRldicl(Instr instr) {
   return (((instr & kOpcodeMask) == EXT5) &&
Index: src/ppc/assembler-ppc.h
diff --git a/src/ppc/assembler-ppc.h b/src/ppc/assembler-ppc.h
index e8a654fe6457022332381d5de2d48e66c076f866..b63612f9648363009f2b68346f52eba1e263954d 100644
--- a/src/ppc/assembler-ppc.h
+++ b/src/ppc/assembler-ppc.h
@@ -1324,6 +1324,7 @@ class Assembler : public AssemblerBase {
   static bool IsCmpRegister(Instr instr);
   static bool IsCmpImmediate(Instr instr);
   static bool IsRlwinm(Instr instr);
+  static bool IsAndi(Instr instr);
 #if V8_TARGET_ARCH_PPC64
   static bool IsRldicl(Instr instr);
 #endif


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to