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

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

Issue 12263010: Optimize stores to ExternalUint8Array and ExternalUint8ClampedArray in the optimizer. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 10 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_x64.h ('k') | runtime/vm/flow_graph_optimizer.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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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"
(...skipping 1726 matching lines...) Expand 10 before | Expand all | Expand 10 after
1737 andl(value, Immediate(kObjectAlignment - 1)); 1737 andl(value, Immediate(kObjectAlignment - 1));
1738 // Compare with the expected bit pattern. 1738 // Compare with the expected bit pattern.
1739 cmpl(value, Immediate( 1739 cmpl(value, Immediate(
1740 (kNewObjectAlignmentOffset >> 1) + kHeapObjectTag + 1740 (kNewObjectAlignmentOffset >> 1) + kHeapObjectTag +
1741 kOldObjectAlignmentOffset + kHeapObjectTag)); 1741 kOldObjectAlignmentOffset + kHeapObjectTag));
1742 j(NOT_ZERO, no_update, Assembler::kNearJump); 1742 j(NOT_ZERO, no_update, Assembler::kNearJump);
1743 } 1743 }
1744 1744
1745 1745
1746 void Assembler::StoreIntoObject(Register object, 1746 void Assembler::StoreIntoObject(Register object,
1747 const FieldAddress& dest, 1747 const Address& dest,
1748 Register value) { 1748 Register value) {
1749 ASSERT(object != value); 1749 ASSERT(object != value);
1750 movq(dest, value); 1750 movq(dest, value);
1751 Label done; 1751 Label done;
1752 StoreIntoObjectFilter(object, value, &done); 1752 StoreIntoObjectFilter(object, value, &done);
1753 // A store buffer update is required. 1753 // A store buffer update is required.
1754 if (value != RAX) pushq(RAX); 1754 if (value != RAX) pushq(RAX);
1755 leaq(RAX, dest); 1755 leaq(RAX, dest);
1756 call(&StubCode::UpdateStoreBufferLabel()); 1756 call(&StubCode::UpdateStoreBufferLabel());
1757 if (value != RAX) popq(RAX); 1757 if (value != RAX) popq(RAX);
1758 Bind(&done); 1758 Bind(&done);
1759 } 1759 }
1760 1760
1761 1761
1762 void Assembler::StoreIntoObjectNoBarrier(Register object, 1762 void Assembler::StoreIntoObjectNoBarrier(Register object,
1763 const FieldAddress& dest, 1763 const Address& dest,
1764 Register value) { 1764 Register value) {
1765 movq(dest, value); 1765 movq(dest, value);
1766 #if defined(DEBUG) 1766 #if defined(DEBUG)
1767 Label done; 1767 Label done;
1768 pushq(value); 1768 pushq(value);
1769 StoreIntoObjectFilter(object, value, &done); 1769 StoreIntoObjectFilter(object, value, &done);
1770 Stop("Store buffer update is required"); 1770 Stop("Store buffer update is required");
1771 Bind(&done); 1771 Bind(&done);
1772 popq(value); 1772 popq(value);
1773 #endif // defined(DEBUG) 1773 #endif // defined(DEBUG)
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after
2157 2157
2158 const char* Assembler::FpuRegisterName(FpuRegister reg) { 2158 const char* Assembler::FpuRegisterName(FpuRegister reg) {
2159 ASSERT((0 <= reg) && (reg < kNumberOfXmmRegisters)); 2159 ASSERT((0 <= reg) && (reg < kNumberOfXmmRegisters));
2160 return xmm_reg_names[reg]; 2160 return xmm_reg_names[reg];
2161 } 2161 }
2162 2162
2163 2163
2164 } // namespace dart 2164 } // namespace dart
2165 2165
2166 #endif // defined TARGET_ARCH_X64 2166 #endif // defined TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « runtime/vm/assembler_x64.h ('k') | runtime/vm/flow_graph_optimizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698