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

Unified Diff: runtime/vm/intrinsifier_x64.cc

Issue 12982010: Review changes (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Merged Created 7 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/intrinsifier_ia32.cc ('k') | runtime/vm/object.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intrinsifier_x64.cc
diff --git a/runtime/vm/intrinsifier_x64.cc b/runtime/vm/intrinsifier_x64.cc
index 3119fdb7594390d8729ab5b641aeaa325ab02eb4..248f6ce05a0cdc17c491c7e45c5b476f40cfea5a 100644
--- a/runtime/vm/intrinsifier_x64.cc
+++ b/runtime/vm/intrinsifier_x64.cc
@@ -454,6 +454,13 @@ void TestByteArrayGetIndex(Assembler* assembler, Label* fall_through) {
/* RDI: untagged array length. */ \
__ cmpq(RDI, Immediate(max_len)); \
__ j(GREATER, &fall_through); \
+ /* Special case for scaling by 16. */ \
+ if (scale_factor == TIMES_16) { \
+ /* double length of array. */ \
+ __ addq(RDI, RDI); \
+ /* only scale by 8. */ \
+ scale_factor = TIMES_8; \
+ } \
const intptr_t fixed_size = sizeof(Raw##type_name) + kObjectAlignment - 1; \
__ leaq(RDI, Address(RDI, scale_factor, fixed_size)); \
__ andq(RDI, Immediate(-kObjectAlignment)); \
@@ -532,11 +539,13 @@ void TestByteArrayGetIndex(Assembler* assembler, Label* fall_through) {
#define SCALARLIST_ALLOCATOR(clazz, scale) \
bool Intrinsifier::clazz##_new(Assembler* assembler) { \
- TYPED_ARRAY_ALLOCATION(clazz, k##clazz##Cid, clazz::kMaxElements, scale); \
+ ScaleFactor scale_fac = scale; \
+ TYPED_ARRAY_ALLOCATION(clazz, k##clazz##Cid, clazz::kMaxElements, scale_fac);\
return false; \
} \
bool Intrinsifier::clazz##_factory(Assembler* assembler) { \
- TYPED_ARRAY_ALLOCATION(clazz, k##clazz##Cid, clazz::kMaxElements, scale); \
+ ScaleFactor scale_fac = scale; \
+ TYPED_ARRAY_ALLOCATION(clazz, k##clazz##Cid, clazz::kMaxElements, scale_fac);\
return false; \
}
@@ -617,6 +626,7 @@ static ScaleFactor GetScaleFactor(intptr_t size) {
case 2: return TIMES_2;
case 4: return TIMES_4;
case 8: return TIMES_8;
+ case 16: return TIMES_16;
}
UNREACHABLE();
return static_cast<ScaleFactor>(0);
« no previous file with comments | « runtime/vm/intrinsifier_ia32.cc ('k') | runtime/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698