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

Unified Diff: src/ic/ppc/ic-compiler-ppc.cc

Issue 571173003: PowerPC specific sub-directories (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Remove IBM copyright, update code to later level Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: src/ic/ppc/ic-compiler-ppc.cc
diff --git a/src/ic/arm/ic-compiler-arm.cc b/src/ic/ppc/ic-compiler-ppc.cc
similarity index 86%
copy from src/ic/arm/ic-compiler-arm.cc
copy to src/ic/ppc/ic-compiler-ppc.cc
index e918fdc9c0e34a5ccaa9a37901fe27bc301463f1..c86845646efcf7502511b794db1536039afd044c 100644
--- a/src/ic/arm/ic-compiler-arm.cc
+++ b/src/ic/ppc/ic-compiler-ppc.cc
@@ -4,7 +4,7 @@
#include "src/v8.h"
-#if V8_TARGET_ARCH_ARM
+#if V8_TARGET_ARCH_PPC
#include "src/ic/ic.h"
#include "src/ic/ic-compiler.h"
@@ -44,10 +44,14 @@ Handle<Code> PropertyICCompiler::CompilePolymorphic(TypeHandleList* types,
// In case we are compiling an IC for dictionary loads and stores, just
// check whether the name is unique.
if (name.is_identical_to(isolate()->factory()->normal_ic_symbol())) {
- __ JumpIfNotUniqueName(this->name(), &miss);
+ Register tmp = scratch1();
+ __ JumpIfSmi(this->name(), &miss);
+ __ LoadP(tmp, FieldMemOperand(this->name(), HeapObject::kMapOffset));
+ __ lbz(tmp, FieldMemOperand(tmp, Map::kInstanceTypeOffset));
+ __ JumpIfNotUniqueNameInstanceType(tmp, &miss);
} else {
- __ cmp(this->name(), Operand(name));
- __ b(ne, &miss);
+ __ Cmpi(this->name(), Operand(name), r0);
+ __ bne(&miss);
}
}
@@ -62,7 +66,7 @@ Handle<Code> PropertyICCompiler::CompilePolymorphic(TypeHandleList* types,
int receiver_count = types->length();
int number_of_handled_maps = 0;
- __ ldr(map_reg, FieldMemOperand(receiver(), HeapObject::kMapOffset));
+ __ LoadP(map_reg, FieldMemOperand(receiver(), HeapObject::kMapOffset));
for (int current = 0; current < receiver_count; ++current) {
Handle<HeapType> type = types->at(current);
Handle<Map> map = IC::TypeToMap(*type, isolate());
@@ -96,7 +100,7 @@ Handle<Code> PropertyICCompiler::CompileKeyedStorePolymorphic(
__ JumpIfSmi(receiver(), &miss);
int receiver_count = receiver_maps->length();
- __ ldr(scratch1(), FieldMemOperand(receiver(), HeapObject::kMapOffset));
+ __ LoadP(scratch1(), FieldMemOperand(receiver(), HeapObject::kMapOffset));
for (int i = 0; i < receiver_count; ++i) {
__ mov(ip, Operand(receiver_maps->at(i)));
__ cmp(scratch1(), ip);
@@ -104,7 +108,7 @@ Handle<Code> PropertyICCompiler::CompileKeyedStorePolymorphic(
__ Jump(handler_stubs->at(i), RelocInfo::CODE_TARGET, eq);
} else {
Label next_map;
- __ b(ne, &next_map);
+ __ bne(&next_map);
__ mov(transition_map(), Operand(transitioned_maps->at(i)));
__ Jump(handler_stubs->at(i), RelocInfo::CODE_TARGET, al);
__ bind(&next_map);
@@ -123,4 +127,4 @@ Handle<Code> PropertyICCompiler::CompileKeyedStorePolymorphic(
}
} // namespace v8::internal
-#endif // V8_TARGET_ARCH_ARM
+#endif // V8_TARGET_ARCH_PPC

Powered by Google App Engine
This is Rietveld 408576698