ip cannot be used in cmp instruction. Revert to r1.
authorfeng@chromium.org <feng@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Thu, 20 Nov 2008 17:33:53 +0000 (17:33 +0000)
committerfeng@chromium.org <feng@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Thu, 20 Nov 2008 17:33:53 +0000 (17:33 +0000)
Review URL: http://codereview.chromium.org/11322

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@808 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

src/ic-arm.cc

index 30944f3..158e63a 100644 (file)
@@ -658,15 +658,16 @@ void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm) {
   // Array case: Get the length and the elements array from the JS
   // array. Check that the array is in fast mode; if it is the
   // length is always a smi.
-  // r0 == value, r1 == key, r3 == object
+  // r0 == value, r3 == object
   __ bind(&array);
   __ ldr(r2, FieldMemOperand(r3, JSObject::kElementsOffset));
-  __ ldr(ip, FieldMemOperand(r2, HeapObject::kMapOffset));
-  __ cmp(ip, Operand(Factory::hash_table_map()));
+  __ ldr(r1, FieldMemOperand(r2, HeapObject::kMapOffset));
+  __ cmp(r1, Operand(Factory::hash_table_map()));
   __ b(eq, &slow);
 
   // Check the key against the length in the array, compute the
   // address to store into and fall through to fast case.
+  __ ldr(r1, MemOperand(sp));  // resotre key 
   // r0 == value, r1 == key, r2 == elements, r3 == object.
   __ ldr(ip, FieldMemOperand(r3, JSArray::kLengthOffset));
   __ cmp(r1, Operand(ip));