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

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

Issue 294223003: Last cross-platform cleanup in preparation of improved ARM code for indexed (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 7 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/intrinsifier_mips.cc ('k') | runtime/vm/object.h » ('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" // Needed here to get TARGET_ARCH_X64. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64.
6 #if defined(TARGET_ARCH_X64) 6 #if defined(TARGET_ARCH_X64)
7 7
8 #include "vm/intrinsifier.h" 8 #include "vm/intrinsifier.h"
9 9
10 #include "vm/assembler.h" 10 #include "vm/assembler.h"
(...skipping 1132 matching lines...) Expand 10 before | Expand all | Expand 10 after
1143 ASSERT(!state_field.IsNull()); 1143 ASSERT(!state_field.IsNull());
1144 const Field& random_A_field = Field::ZoneHandle( 1144 const Field& random_A_field = Field::ZoneHandle(
1145 random_class.LookupStaticField(Symbols::_A())); 1145 random_class.LookupStaticField(Symbols::_A()));
1146 ASSERT(!random_A_field.IsNull()); 1146 ASSERT(!random_A_field.IsNull());
1147 ASSERT(random_A_field.is_const()); 1147 ASSERT(random_A_field.is_const());
1148 const Instance& a_value = Instance::Handle(random_A_field.value()); 1148 const Instance& a_value = Instance::Handle(random_A_field.value());
1149 const int64_t a_int_value = Integer::Cast(a_value).AsInt64Value(); 1149 const int64_t a_int_value = Integer::Cast(a_value).AsInt64Value();
1150 __ movq(RAX, Address(RSP, + 1 * kWordSize)); // Receiver. 1150 __ movq(RAX, Address(RSP, + 1 * kWordSize)); // Receiver.
1151 __ movq(RBX, FieldAddress(RAX, state_field.Offset())); // Field '_state'. 1151 __ movq(RBX, FieldAddress(RAX, state_field.Offset())); // Field '_state'.
1152 // Addresses of _state[0] and _state[1]. 1152 // Addresses of _state[0] and _state[1].
1153 const intptr_t index_scale = 1153 const intptr_t scale = Instance::ElementSizeFor(kTypedDataUint32ArrayCid);
1154 FlowGraphCompiler::ElementSizeFor(kTypedDataUint32ArrayCid); 1154 const intptr_t offset = Instance::DataOffsetFor(kTypedDataUint32ArrayCid);
1155 const intptr_t offset = 1155 Address addr_0 = FieldAddress(RBX, 0 * scale + offset);
1156 FlowGraphCompiler::DataOffsetFor(kTypedDataUint32ArrayCid); 1156 Address addr_1 = FieldAddress(RBX, 1 * scale + offset);
1157 Address addr_0 = FieldAddress(RBX, 0 * index_scale + offset);
1158 Address addr_1 = FieldAddress(RBX, 1 * index_scale + offset);
1159 __ movq(RAX, Immediate(a_int_value)); 1157 __ movq(RAX, Immediate(a_int_value));
1160 __ movl(RCX, addr_0); 1158 __ movl(RCX, addr_0);
1161 __ imulq(RCX, RAX); 1159 __ imulq(RCX, RAX);
1162 __ movl(RDX, addr_1); 1160 __ movl(RDX, addr_1);
1163 __ addq(RDX, RCX); 1161 __ addq(RDX, RCX);
1164 __ movl(addr_0, RDX); 1162 __ movl(addr_0, RDX);
1165 __ shrq(RDX, Immediate(32)); 1163 __ shrq(RDX, Immediate(32));
1166 __ movl(addr_1, RDX); 1164 __ movl(addr_1, RDX);
1167 __ ret(); 1165 __ ret();
1168 } 1166 }
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after
1578 // Set return value to Isolate::current_tag_. 1576 // Set return value to Isolate::current_tag_.
1579 __ movq(RAX, Address(RBX, Isolate::current_tag_offset())); 1577 __ movq(RAX, Address(RBX, Isolate::current_tag_offset()));
1580 __ ret(); 1578 __ ret();
1581 } 1579 }
1582 1580
1583 #undef __ 1581 #undef __
1584 1582
1585 } // namespace dart 1583 } // namespace dart
1586 1584
1587 #endif // defined TARGET_ARCH_X64 1585 #endif // defined TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « runtime/vm/intrinsifier_mips.cc ('k') | runtime/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698