Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(222)

Side by Side Diff: src/ic/ppc/ic-ppc.cc

Issue 1202383005: PPC: Debug check fix for test SMI optimization. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/ppc/assembler-ppc.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_PPC 7 #if V8_TARGET_ARCH_PPC
8 8
9 #include "src/codegen.h" 9 #include "src/codegen.h"
10 #include "src/ic/ic.h" 10 #include "src/ic/ic.h"
(...skipping 856 matching lines...) Expand 10 before | Expand all | Expand 10 after
867 // and vice-versa to be disabled again. 867 // and vice-versa to be disabled again.
868 CodePatcher patcher(patch_address, 2); 868 CodePatcher patcher(patch_address, 2);
869 Register reg = Assembler::GetRA(instr_at_patch); 869 Register reg = Assembler::GetRA(instr_at_patch);
870 if (check == ENABLE_INLINED_SMI_CHECK) { 870 if (check == ENABLE_INLINED_SMI_CHECK) {
871 DCHECK(Assembler::IsCmpRegister(instr_at_patch)); 871 DCHECK(Assembler::IsCmpRegister(instr_at_patch));
872 DCHECK_EQ(Assembler::GetRA(instr_at_patch).code(), 872 DCHECK_EQ(Assembler::GetRA(instr_at_patch).code(),
873 Assembler::GetRB(instr_at_patch).code()); 873 Assembler::GetRB(instr_at_patch).code());
874 patcher.masm()->TestIfSmi(reg, r0); 874 patcher.masm()->TestIfSmi(reg, r0);
875 } else { 875 } else {
876 DCHECK(check == DISABLE_INLINED_SMI_CHECK); 876 DCHECK(check == DISABLE_INLINED_SMI_CHECK);
877 #if V8_TARGET_ARCH_PPC64 877 DCHECK(Assembler::IsAndi(instr_at_patch));
878 DCHECK(Assembler::IsRldicl(instr_at_patch));
879 #else
880 DCHECK(Assembler::IsRlwinm(instr_at_patch));
881 #endif
882 patcher.masm()->cmp(reg, reg, cr0); 878 patcher.masm()->cmp(reg, reg, cr0);
883 } 879 }
884 DCHECK(Assembler::IsBranch(branch_instr)); 880 DCHECK(Assembler::IsBranch(branch_instr));
885 881
886 // Invert the logic of the branch 882 // Invert the logic of the branch
887 if (Assembler::GetCondition(branch_instr) == eq) { 883 if (Assembler::GetCondition(branch_instr) == eq) {
888 patcher.EmitCondition(ne); 884 patcher.EmitCondition(ne);
889 } else { 885 } else {
890 DCHECK(Assembler::GetCondition(branch_instr) == ne); 886 DCHECK(Assembler::GetCondition(branch_instr) == ne);
891 patcher.EmitCondition(eq); 887 patcher.EmitCondition(eq);
892 } 888 }
893 } 889 }
894 } // namespace internal 890 } // namespace internal
895 } // namespace v8 891 } // namespace v8
896 892
897 #endif // V8_TARGET_ARCH_PPC 893 #endif // V8_TARGET_ARCH_PPC
OLDNEW
« no previous file with comments | « no previous file | src/ppc/assembler-ppc.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698