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

Side by Side Diff: src/arm/code-stubs-arm.cc

Issue 8342032: Bugfix for r9690. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Changed temp register to r2. Created 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 6914 matching lines...) Expand 10 before | Expand all | Expand 10 after
6925 // Used in KeyedStoreStubCompiler::CompileStoreField via GenerateStoreField. 6925 // Used in KeyedStoreStubCompiler::CompileStoreField via GenerateStoreField.
6926 { r2, r1, r3, EMIT_REMEMBERED_SET }, 6926 { r2, r1, r3, EMIT_REMEMBERED_SET },
6927 { r3, r1, r2, EMIT_REMEMBERED_SET }, 6927 { r3, r1, r2, EMIT_REMEMBERED_SET },
6928 // KeyedStoreStubCompiler::GenerateStoreFastElement. 6928 // KeyedStoreStubCompiler::GenerateStoreFastElement.
6929 { r4, r2, r3, EMIT_REMEMBERED_SET }, 6929 { r4, r2, r3, EMIT_REMEMBERED_SET },
6930 // FastElementsConversionStub::GenerateSmiOnlyToObject 6930 // FastElementsConversionStub::GenerateSmiOnlyToObject
6931 // and FastElementsConversionStub::GenerateSmiOnlyToDouble 6931 // and FastElementsConversionStub::GenerateSmiOnlyToDouble
6932 // and FastElementsConversionStub::GenerateDoubleToObject 6932 // and FastElementsConversionStub::GenerateDoubleToObject
6933 { r2, r3, r9, EMIT_REMEMBERED_SET }, 6933 { r2, r3, r9, EMIT_REMEMBERED_SET },
6934 // FastElementsConversionStub::GenerateDoubleToObject 6934 // FastElementsConversionStub::GenerateDoubleToObject
6935 { r6, r0, r3, EMIT_REMEMBERED_SET }, 6935 { r6, r0, r2, EMIT_REMEMBERED_SET },
6936 { r2, r6, r9, EMIT_REMEMBERED_SET }, 6936 { r2, r6, r9, EMIT_REMEMBERED_SET },
6937 // Null termination. 6937 // Null termination.
6938 { no_reg, no_reg, no_reg, EMIT_REMEMBERED_SET} 6938 { no_reg, no_reg, no_reg, EMIT_REMEMBERED_SET}
6939 }; 6939 };
6940 6940
6941 6941
6942 bool RecordWriteStub::IsPregenerated() { 6942 bool RecordWriteStub::IsPregenerated() {
6943 for (AheadOfTimeWriteBarrierStubList* entry = kAheadOfTime; 6943 for (AheadOfTimeWriteBarrierStubList* entry = kAheadOfTime;
6944 !entry->object.is(no_reg); 6944 !entry->object.is(no_reg);
6945 entry++) { 6945 entry++) {
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after
7329 __ add(r0, r0, Operand(r5, LSL, 1)); 7329 __ add(r0, r0, Operand(r5, LSL, 1));
7330 __ AllocateInNewSpace(r0, r6, r7, r9, &gc_required, NO_ALLOCATION_FLAGS); 7330 __ AllocateInNewSpace(r0, r6, r7, r9, &gc_required, NO_ALLOCATION_FLAGS);
7331 // r6: destination FixedArray, not tagged as heap object 7331 // r6: destination FixedArray, not tagged as heap object
7332 __ LoadRoot(r9, Heap::kFixedArrayMapRootIndex); 7332 __ LoadRoot(r9, Heap::kFixedArrayMapRootIndex);
7333 __ str(r9, MemOperand(r6, HeapObject::kMapOffset)); 7333 __ str(r9, MemOperand(r6, HeapObject::kMapOffset));
7334 // Set destination FixedDoubleArray's length. 7334 // Set destination FixedDoubleArray's length.
7335 __ str(r5, MemOperand(r6, FixedDoubleArray::kLengthOffset)); 7335 __ str(r5, MemOperand(r6, FixedDoubleArray::kLengthOffset));
7336 7336
7337 // Prepare for conversion loop. 7337 // Prepare for conversion loop.
7338 __ add(r4, r4, Operand(FixedDoubleArray::kHeaderSize - kHeapObjectTag + 4)); 7338 __ add(r4, r4, Operand(FixedDoubleArray::kHeaderSize - kHeapObjectTag + 4));
7339 __ add(r3, r6, Operand(FixedArray::kHeaderSize - 4)); 7339 __ add(r3, r6, Operand(FixedArray::kHeaderSize));
7340 __ add(r6, r6, Operand(kHeapObjectTag)); 7340 __ add(r6, r6, Operand(kHeapObjectTag));
7341 __ add(r5, r3, Operand(r5, LSL, 1)); 7341 __ add(r5, r3, Operand(r5, LSL, 1));
7342 __ LoadRoot(r7, Heap::kTheHoleValueRootIndex); 7342 __ LoadRoot(r7, Heap::kTheHoleValueRootIndex);
7343 __ LoadRoot(r9, Heap::kHeapNumberMapRootIndex); 7343 __ LoadRoot(r9, Heap::kHeapNumberMapRootIndex);
7344 // Using offsetted addresses to fully take advantage of pre/post-indexing 7344 // Using offsetted addresses in r4 to fully take advantage of post-indexing.
7345 // r3: begin of destination FixedArray element fields, not tagged, -4 7345 // r3: begin of destination FixedArray element fields, not tagged
7346 // r4: begin of source FixedDoubleArray element fields, not tagged, +4 7346 // r4: begin of source FixedDoubleArray element fields, not tagged, +4
7347 // r5: end of destination FixedArray, not tagged, -4 7347 // r5: end of destination FixedArray, not tagged
7348 // r6: destination FixedArray 7348 // r6: destination FixedArray
7349 // r7: the-hole pointer 7349 // r7: the-hole pointer
7350 // r9: heap number map 7350 // r9: heap number map
7351 __ b(&entry); 7351 __ b(&entry);
7352 7352
7353 // Call into runtime if GC is required. 7353 // Call into runtime if GC is required.
7354 __ bind(&gc_required); 7354 __ bind(&gc_required);
7355 __ Pop(r2, r3); 7355 __ Pop(r2, r3);
7356 __ Pop(r0, r1); 7356 __ Pop(r0, r1);
7357 __ pop(lr); 7357 __ pop(lr);
7358 KeyedStoreIC::GenerateRuntimeSetProperty(masm, strict_mode); 7358 KeyedStoreIC::GenerateRuntimeSetProperty(masm, strict_mode);
7359 7359
7360 __ bind(&loop); 7360 __ bind(&loop);
7361 __ ldr(lr, MemOperand(r4, 8, PostIndex)); 7361 __ ldr(lr, MemOperand(r4, 8, PostIndex));
7362 // lr: current element's upper 32 bit 7362 // lr: current element's upper 32 bit
7363 // r4: address of next element's upper 32 bit 7363 // r4: address of next element's upper 32 bit
7364 __ cmp(lr, Operand(kHoleNanUpper32)); 7364 __ cmp(lr, Operand(kHoleNanUpper32));
7365 __ b(eq, &convert_hole); 7365 __ b(eq, &convert_hole);
7366 7366
7367 // Non-hole double, copy value into a heap number. 7367 // Non-hole double, copy value into a heap number.
7368 __ AllocateHeapNumber(r0, r1, r2, r9, &gc_required); 7368 __ AllocateHeapNumber(r0, r1, r2, r9, &gc_required);
7369 __ str(lr, FieldMemOperand(r0, HeapNumber::kExponentOffset)); 7369 __ str(lr, FieldMemOperand(r0, HeapNumber::kExponentOffset));
7370 __ ldr(lr, MemOperand(r4, 12, NegOffset)); 7370 __ ldr(lr, MemOperand(r4, 12, NegOffset));
7371 __ str(lr, FieldMemOperand(r0, HeapNumber::kMantissaOffset)); 7371 __ str(lr, FieldMemOperand(r0, HeapNumber::kMantissaOffset));
7372 __ str(r0, MemOperand(r3, 4, PreIndex)); 7372 __ mov(r2, r3);
7373 __ str(r0, MemOperand(r3, 4, PostIndex));
7373 __ RecordWrite(r6, 7374 __ RecordWrite(r6,
7374 r3, 7375 r2,
7375 r0, 7376 r0,
7376 kLRHasBeenSaved, 7377 kLRHasBeenSaved,
7377 kDontSaveFPRegs, 7378 kDontSaveFPRegs,
7378 EMIT_REMEMBERED_SET, 7379 EMIT_REMEMBERED_SET,
7379 OMIT_SMI_CHECK); 7380 OMIT_SMI_CHECK);
7380 __ b(&entry); 7381 __ b(&entry);
7381 7382
7382 // Replace the-hole NaN with the-hole pointer. 7383 // Replace the-hole NaN with the-hole pointer.
7383 __ bind(&convert_hole); 7384 __ bind(&convert_hole);
7384 __ str(r7, MemOperand(r3, 4, PreIndex)); 7385 __ str(r7, MemOperand(r3, 4, PostIndex));
7385 7386
7386 __ bind(&entry); 7387 __ bind(&entry);
7387 __ cmp(r3, r5); 7388 __ cmp(r3, r5);
7388 __ b(lt, &loop); 7389 __ b(lt, &loop);
7389 7390
7390 __ Pop(r2, r3); 7391 __ Pop(r2, r3);
Sven Panne 2011/10/19 10:43:34 Not introduced by this CL, but anyway: Our ARM mac
7391 __ Pop(r0, r1); 7392 __ Pop(r0, r1);
7392 // Update receiver's map. 7393 // Update receiver's map.
7393 __ str(r3, FieldMemOperand(r2, HeapObject::kMapOffset)); 7394 __ str(r3, FieldMemOperand(r2, HeapObject::kMapOffset));
7394 __ RecordWriteField(r2, 7395 __ RecordWriteField(r2,
7395 HeapObject::kMapOffset, 7396 HeapObject::kMapOffset,
7396 r3, 7397 r3,
7397 r9, 7398 r9,
7398 kLRHasBeenSaved, 7399 kLRHasBeenSaved,
7399 kDontSaveFPRegs, 7400 kDontSaveFPRegs,
7400 EMIT_REMEMBERED_SET, 7401 EMIT_REMEMBERED_SET,
(...skipping 10 matching lines...) Expand all
7411 OMIT_SMI_CHECK); 7412 OMIT_SMI_CHECK);
7412 __ pop(lr); 7413 __ pop(lr);
7413 } 7414 }
7414 7415
7415 7416
7416 #undef __ 7417 #undef __
7417 7418
7418 } } // namespace v8::internal 7419 } } // namespace v8::internal
7419 7420
7420 #endif // V8_TARGET_ARCH_ARM 7421 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698