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

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

Issue 10636017: - Fix the x64 store-barrier. (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
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
siva 2012/06/22 23:02:25 2012
Ivan Posva 2012/06/22 23:42:21 Done.
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_X64) 6 #if defined(TARGET_ARCH_X64)
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"
11 #include "vm/runtime_entry.h" 11 #include "vm/runtime_entry.h"
(...skipping 1392 matching lines...) Expand 10 before | Expand all | Expand 10 after
1404 if (object.IsSmi()) { 1404 if (object.IsSmi()) {
1405 cmpq(reg, Immediate(reinterpret_cast<int64_t>(object.raw()))); 1405 cmpq(reg, Immediate(reinterpret_cast<int64_t>(object.raw())));
1406 } else { 1406 } else {
1407 ASSERT(reg != TMP); 1407 ASSERT(reg != TMP);
1408 LoadObject(TMP, object); 1408 LoadObject(TMP, object);
1409 cmpq(reg, TMP); 1409 cmpq(reg, TMP);
1410 } 1410 }
1411 } 1411 }
1412 1412
1413 1413
1414 void Assembler::StoreIntoObjectFilter(Register object, 1414 void Assembler::StoreIntoObjectFilter(Register object,
cshapiro 2012/06/22 23:22:40 Document as destroying value? Maybe in the header
Ivan Posva 2012/06/22 23:42:21 Done.
1415 Register value, 1415 Register value,
1416 Label* no_update) { 1416 Label* no_update) {
1417 andl(value, Immediate(0x5)); 1417 andl(value, Immediate(0x9));
cshapiro 2012/06/22 23:22:40 Can't these values be synthesized from constants?
Ivan Posva 2012/06/22 23:42:21 Using the constants would actually be a very nice
1418 shrl(value, Immediate(1)); 1418 shrl(value, Immediate(1));
1419 adcl(value, object); 1419 adcl(value, object);
1420 andl(value, Immediate(0x7)); 1420 andl(value, Immediate(0xf));
cshapiro 2012/06/22 23:22:40 ditto
1421 cmpl(value, Immediate(0x4)); 1421 cmpl(value, Immediate(0x6));
cshapiro 2012/06/22 23:22:40 ditto
1422 j(NOT_ZERO, no_update, Assembler::kNearJump); 1422 j(NOT_ZERO, no_update, Assembler::kNearJump);
1423 } 1423 }
1424 1424
1425 1425
1426 void Assembler::StoreIntoObject(Register object, 1426 void Assembler::StoreIntoObject(Register object,
1427 const FieldAddress& dest, 1427 const FieldAddress& dest,
1428 Register value) { 1428 Register value) {
1429 movq(dest, value); 1429 movq(dest, value);
1430 1430
1431 Label done; 1431 Label done;
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
1731 comments.SetCommentAt(i, comments_[i]->comment()); 1731 comments.SetCommentAt(i, comments_[i]->comment());
1732 } 1732 }
1733 1733
1734 return comments; 1734 return comments;
1735 } 1735 }
1736 1736
1737 1737
1738 } // namespace dart 1738 } // namespace dart
1739 1739
1740 #endif // defined TARGET_ARCH_X64 1740 #endif // defined TARGET_ARCH_X64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698