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

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

Issue 10581007: Correct the masks and conditions used to filter cross generation stores. (Closed) Base URL: https://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 | 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 (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 1376 matching lines...) Expand 10 before | Expand all | Expand 10 after
1387 1387
1388 1388
1389 void Assembler::StoreIntoObject(Register object, 1389 void Assembler::StoreIntoObject(Register object,
1390 const FieldAddress& dest, 1390 const FieldAddress& dest,
1391 Register value) { 1391 Register value) {
1392 movl(dest, value); 1392 movl(dest, value);
1393 Label done; 1393 Label done;
1394 // Check that 'value' is a new object. Store buffer updates are not 1394 // Check that 'value' is a new object. Store buffer updates are not
1395 // required when storing a smi or an old object. 1395 // required when storing a smi or an old object.
1396 testl(value, Immediate(kNewObjectAlignmentOffset | kHeapObjectTag)); 1396 testl(value, Immediate(kNewObjectAlignmentOffset | kHeapObjectTag));
1397 j(NOT_EQUAL, &done, Assembler::kNearJump); 1397 j(PARITY_ODD, &done, Assembler::kNearJump);
1398 // Check that 'object' is an old object. A store buffer update is 1398 // Check that 'object' is an old object. A store buffer update is
1399 // not required when storing into a new object. 1399 // not required when storing into a new object.
1400 testl(object, Immediate(kOldObjectAlignmentOffset | kHeapObjectTag)); 1400 testl(object, Immediate(kNewObjectAlignmentOffset));
1401 j(NOT_EQUAL, &done, Assembler::kNearJump); 1401 j(NOT_ZERO, &done, Assembler::kNearJump);
1402 // A store buffer update is required. 1402 // A store buffer update is required.
1403 pushal(); 1403 pushal();
1404 pushl(dest); // Push argument 1404 pushl(dest); // Push argument
1405 CallRuntime(kStoreBufferRuntimeEntry); 1405 CallRuntime(kStoreBufferRuntimeEntry);
1406 popl(value); // Pop argument 1406 popl(value); // Pop argument
1407 popal(); 1407 popal();
1408 Bind(&done); 1408 Bind(&done);
1409 } 1409 }
1410 1410
1411 1411
1412 void Assembler::StoreIntoObjectNoBarrier(Register object, 1412 void Assembler::StoreIntoObjectNoBarrier(Register object,
1413 const FieldAddress& dest, 1413 const FieldAddress& dest,
1414 Register value) { 1414 Register value) {
1415 movl(dest, value); 1415 movl(dest, value);
1416 #if defined(DEBUG) 1416 #if defined(DEBUG)
1417 Label done; 1417 Label done;
1418 testl(value, Immediate(kNewObjectAlignmentOffset | kHeapObjectTag)); 1418 testl(value, Immediate(kNewObjectAlignmentOffset | kHeapObjectTag));
1419 j(NOT_EQUAL, &done, Assembler::kNearJump); 1419 j(PARITY_ODD, &done, Assembler::kNearJump);
1420 testl(object, Immediate(kOldObjectAlignmentOffset | kHeapObjectTag)); 1420 testl(object, Immediate(kNewObjectAlignmentOffset));
1421 j(NOT_EQUAL, &done, Assembler::kNearJump); 1421 j(NOT_ZERO, &done, Assembler::kNearJump);
1422 Stop("Store buffer update is required"); 1422 Stop("Store buffer update is required");
1423 Bind(&done); 1423 Bind(&done);
1424 #endif 1424 #endif
1425 // No store buffer update. 1425 // No store buffer update.
1426 } 1426 }
1427 1427
1428 1428
1429 void Assembler::StoreIntoObjectNoBarrier(Register object, 1429 void Assembler::StoreIntoObjectNoBarrier(Register object,
1430 const FieldAddress& dest, 1430 const FieldAddress& dest,
1431 const Object& value) { 1431 const Object& value) {
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
1718 comments.SetCommentAt(i, comments_[i]->comment()); 1718 comments.SetCommentAt(i, comments_[i]->comment());
1719 } 1719 }
1720 1720
1721 return comments; 1721 return comments;
1722 } 1722 }
1723 1723
1724 1724
1725 } // namespace dart 1725 } // namespace dart
1726 1726
1727 #endif // defined TARGET_ARCH_IA32 1727 #endif // defined TARGET_ARCH_IA32
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