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

Side by Side Diff: runtime/vm/assembler_ia32.cc

Issue 10592023: - Fix the barrier code when low bits of Smi are zeroes. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 6 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 | runtime/vm/assembler_ia32_test.cc » ('j') | runtime/vm/assembler_ia32_test.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/globals.h" 5 #include "vm/globals.h"
6 #if defined(TARGET_ARCH_IA32) 6 #if defined(TARGET_ARCH_IA32)
7 7
8 #include "vm/assembler.h" 8 #include "vm/assembler.h"
9 #include "vm/heap.h" 9 #include "vm/heap.h"
10 #include "vm/memory_region.h" 10 #include "vm/memory_region.h"
(...skipping 1375 matching lines...) Expand 10 before | Expand all | Expand 10 after
1386 1386
1387 void Assembler::StoreIntoObject(Register object, 1387 void Assembler::StoreIntoObject(Register object,
1388 const FieldAddress& dest, 1388 const FieldAddress& dest,
1389 Register value) { 1389 Register value) {
1390 movl(dest, value); 1390 movl(dest, value);
1391 Label done; 1391 Label done;
1392 // Check that 'value' is a new object. Store buffer updates are not 1392 // Check that 'value' is a new object. Store buffer updates are not
1393 // required when storing a smi or an old object. 1393 // required when storing a smi or an old object.
1394 testl(value, Immediate(kNewObjectAlignmentOffset | kHeapObjectTag)); 1394 testl(value, Immediate(kNewObjectAlignmentOffset | kHeapObjectTag));
1395 j(PARITY_ODD, &done, Assembler::kNearJump); 1395 j(PARITY_ODD, &done, Assembler::kNearJump);
1396 j(ZERO, &done, Assembler::kNearJump);
1396 // Check that 'object' is an old object. A store buffer update is 1397 // Check that 'object' is an old object. A store buffer update is
1397 // not required when storing into a new object. 1398 // not required when storing into a new object.
1398 testl(object, Immediate(kNewObjectAlignmentOffset)); 1399 testl(object, Immediate(kNewObjectAlignmentOffset));
1399 j(NOT_ZERO, &done, Assembler::kNearJump); 1400 j(NOT_ZERO, &done, Assembler::kNearJump);
1400 // A store buffer update is required. 1401 // A store buffer update is required.
1401 pushl(EAX); // Preserve EAX. 1402 pushl(EAX); // Preserve EAX.
1402 leal(EAX, dest); 1403 leal(EAX, dest);
1403 call(&StubCode::UpdateStoreBufferLabel()); 1404 call(&StubCode::UpdateStoreBufferLabel());
1404 popl(EAX); // Restore EAX. 1405 popl(EAX); // Restore EAX.
1405 Bind(&done); 1406 Bind(&done);
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
1725 comments.SetCommentAt(i, comments_[i]->comment()); 1726 comments.SetCommentAt(i, comments_[i]->comment());
1726 } 1727 }
1727 1728
1728 return comments; 1729 return comments;
1729 } 1730 }
1730 1731
1731 1732
1732 } // namespace dart 1733 } // namespace dart
1733 1734
1734 #endif // defined TARGET_ARCH_IA32 1735 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/assembler_ia32_test.cc » ('j') | runtime/vm/assembler_ia32_test.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698