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

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

Issue 11198072: Inline load and store index on Float32Arrays. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Codereview fixes. Created 8 years, 2 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) 2012, 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" // 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/flow_graph_compiler.h" 8 #include "vm/flow_graph_compiler.h"
9 9
10 #include "lib/error.h" 10 #include "lib/error.h"
(...skipping 17 matching lines...) Expand all
28 28
29 FieldAddress FlowGraphCompiler::ElementAddressForRegIndex(intptr_t cid, 29 FieldAddress FlowGraphCompiler::ElementAddressForRegIndex(intptr_t cid,
30 Register array, 30 Register array,
31 Register index) { 31 Register index) {
32 // Note that index is Smi, i.e, times 2. 32 // Note that index is Smi, i.e, times 2.
33 ASSERT(kSmiTagShift == 1); 33 ASSERT(kSmiTagShift == 1);
34 switch (cid) { 34 switch (cid) {
35 case kArrayCid: 35 case kArrayCid:
36 case kImmutableArrayCid: 36 case kImmutableArrayCid:
37 return FieldAddress(array, index, TIMES_4, sizeof(RawArray)); 37 return FieldAddress(array, index, TIMES_4, sizeof(RawArray));
38 case kFloat32ArrayCid:
39 return FieldAddress(array, index, TIMES_2, Float32Array::data_offset());
38 case kFloat64ArrayCid: 40 case kFloat64ArrayCid:
39 return FieldAddress(array, index, TIMES_4, Float64Array::data_offset()); 41 return FieldAddress(array, index, TIMES_4, Float64Array::data_offset());
40 default: 42 default:
41 UNIMPLEMENTED(); 43 UNIMPLEMENTED();
42 return FieldAddress(SPREG, 0); 44 return FieldAddress(SPREG, 0);
43 } 45 }
44 } 46 }
45 47
46 48
47 bool FlowGraphCompiler::SupportsUnboxedMints() { 49 bool FlowGraphCompiler::SupportsUnboxedMints() {
(...skipping 1308 matching lines...) Expand 10 before | Expand all | Expand 10 after
1356 void ParallelMoveResolver::Exchange(const Address& mem1, const Address& mem2) { 1358 void ParallelMoveResolver::Exchange(const Address& mem1, const Address& mem2) {
1357 __ Exchange(mem1, mem2); 1359 __ Exchange(mem1, mem2);
1358 } 1360 }
1359 1361
1360 1362
1361 #undef __ 1363 #undef __
1362 1364
1363 } // namespace dart 1365 } // namespace dart
1364 1366
1365 #endif // defined TARGET_ARCH_X64 1367 #endif // defined TARGET_ARCH_X64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698