OLD | NEW |
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 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 case 4: return TIMES_4; | 231 case 4: return TIMES_4; |
232 case 8: return TIMES_8; | 232 case 8: return TIMES_8; |
233 case 16: return TIMES_16; | 233 case 16: return TIMES_16; |
234 } | 234 } |
235 UNREACHABLE(); | 235 UNREACHABLE(); |
236 return static_cast<ScaleFactor>(0); | 236 return static_cast<ScaleFactor>(0); |
237 } | 237 } |
238 | 238 |
239 | 239 |
240 #define TYPED_DATA_ALLOCATOR(clazz) \ | 240 #define TYPED_DATA_ALLOCATOR(clazz) \ |
241 void Intrinsifier::TypedData_##clazz##_new(Assembler* assembler) { \ | |
242 intptr_t size = TypedData::ElementSizeInBytes(kTypedData##clazz##Cid); \ | |
243 intptr_t max_len = TypedData::MaxElements(kTypedData##clazz##Cid); \ | |
244 ScaleFactor scale = GetScaleFactor(size); \ | |
245 TYPED_ARRAY_ALLOCATION(TypedData, kTypedData##clazz##Cid, max_len, scale); \ | |
246 } \ | |
247 void Intrinsifier::TypedData_##clazz##_factory(Assembler* assembler) { \ | 241 void Intrinsifier::TypedData_##clazz##_factory(Assembler* assembler) { \ |
248 intptr_t size = TypedData::ElementSizeInBytes(kTypedData##clazz##Cid); \ | 242 intptr_t size = TypedData::ElementSizeInBytes(kTypedData##clazz##Cid); \ |
249 intptr_t max_len = TypedData::MaxElements(kTypedData##clazz##Cid); \ | 243 intptr_t max_len = TypedData::MaxElements(kTypedData##clazz##Cid); \ |
250 ScaleFactor scale = GetScaleFactor(size); \ | 244 ScaleFactor scale = GetScaleFactor(size); \ |
251 TYPED_ARRAY_ALLOCATION(TypedData, kTypedData##clazz##Cid, max_len, scale); \ | 245 TYPED_ARRAY_ALLOCATION(TypedData, kTypedData##clazz##Cid, max_len, scale); \ |
252 } | 246 } |
253 CLASS_LIST_TYPED_DATA(TYPED_DATA_ALLOCATOR) | 247 CLASS_LIST_TYPED_DATA(TYPED_DATA_ALLOCATOR) |
254 #undef TYPED_DATA_ALLOCATOR | 248 #undef TYPED_DATA_ALLOCATOR |
255 | 249 |
256 | 250 |
(...skipping 1849 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2106 __ LoadIsolate(RAX); | 2100 __ LoadIsolate(RAX); |
2107 __ movq(RAX, Address(RAX, Isolate::current_tag_offset())); | 2101 __ movq(RAX, Address(RAX, Isolate::current_tag_offset())); |
2108 __ ret(); | 2102 __ ret(); |
2109 } | 2103 } |
2110 | 2104 |
2111 #undef __ | 2105 #undef __ |
2112 | 2106 |
2113 } // namespace dart | 2107 } // namespace dart |
2114 | 2108 |
2115 #endif // defined TARGET_ARCH_X64 | 2109 #endif // defined TARGET_ARCH_X64 |
OLD | NEW |