From c05c9f1881ffd50a1f3600250a05c0986414fbb9 Mon Sep 17 00:00:00 2001 From: dstence Date: Wed, 24 Jun 2015 14:21:44 -0700 Subject: [PATCH] PPC: Debug check fix for test SMI optimization. R=mbrandy@us.ibm.com, michael_dawson@ca.ibm.com BUG= Review URL: https://codereview.chromium.org/1202383005 Cr-Commit-Position: refs/heads/master@{#29269} --- src/ic/ppc/ic-ppc.cc | 6 +----- src/ppc/assembler-ppc.cc | 3 +++ src/ppc/assembler-ppc.h | 1 + 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/ic/ppc/ic-ppc.cc b/src/ic/ppc/ic-ppc.cc index fdb88ae..0858edc 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)); diff --git a/src/ppc/assembler-ppc.cc b/src/ppc/assembler-ppc.cc index 38c7fd8..571a9fc 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) && diff --git a/src/ppc/assembler-ppc.h b/src/ppc/assembler-ppc.h index e8a654f..b63612f 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 -- 2.7.4