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

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
« no previous file with comments | « runtime/vm/assembler_test.cc ('k') | runtime/vm/assembler_x64_test.cc » ('j') | 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) 2012, 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_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 // Destroys the incoming value.
1414 void Assembler::StoreIntoObjectFilter(Register object, 1415 void Assembler::StoreIntoObjectFilter(Register object,
1415 Register value, 1416 Register value,
1416 Label* no_update) { 1417 Label* no_update) {
1417 andl(value, Immediate(0x5)); 1418 andl(value, Immediate(0x9));
1418 shrl(value, Immediate(1)); 1419 shrl(value, Immediate(1));
1419 adcl(value, object); 1420 adcl(value, object);
1420 andl(value, Immediate(0x7)); 1421 andl(value, Immediate(0xf));
1421 cmpl(value, Immediate(0x4)); 1422 cmpl(value, Immediate(0x6));
1422 j(NOT_ZERO, no_update, Assembler::kNearJump); 1423 j(NOT_ZERO, no_update, Assembler::kNearJump);
1423 } 1424 }
1424 1425
1425 1426
1426 void Assembler::StoreIntoObject(Register object, 1427 void Assembler::StoreIntoObject(Register object,
1427 const FieldAddress& dest, 1428 const FieldAddress& dest,
1428 Register value) { 1429 Register value) {
1429 movq(dest, value); 1430 movq(dest, value);
1430 1431
1431 Label done; 1432 Label done;
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
1731 comments.SetCommentAt(i, comments_[i]->comment()); 1732 comments.SetCommentAt(i, comments_[i]->comment());
1732 } 1733 }
1733 1734
1734 return comments; 1735 return comments;
1735 } 1736 }
1736 1737
1737 1738
1738 } // namespace dart 1739 } // namespace dart
1739 1740
1740 #endif // defined TARGET_ARCH_X64 1741 #endif // defined TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « runtime/vm/assembler_test.cc ('k') | runtime/vm/assembler_x64_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698