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

Unified Diff: runtime/vm/intrinsifier_ia32.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.h ('k') | runtime/vm/intrinsifier_x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intrinsifier_ia32.cc
diff --git a/runtime/vm/intrinsifier_ia32.cc b/runtime/vm/intrinsifier_ia32.cc
index db68d8495938710d4bb4a4f484e7c22a24a7d08f..64f58daca502c35026c601e4ed9da7d1ec3b1e06 100644
--- a/runtime/vm/intrinsifier_ia32.cc
+++ b/runtime/vm/intrinsifier_ia32.cc
@@ -482,6 +482,13 @@ bool Intrinsifier::ByteArrayBase_getLength(Assembler* assembler) {
/* EDI: untagged array length. */ \
__ cmpl(EDI, Immediate(max_len)); \
__ j(GREATER, &fall_through); \
+ /* Special case for scaling by 16. */ \
+ if (scale_factor == TIMES_16) { \
+ /* double length of array. */ \
+ __ addl(EDI, EDI); \
+ /* only scale by 8. */ \
+ scale_factor = TIMES_8; \
+ } \
const intptr_t fixed_size = sizeof(Raw##type_name) + kObjectAlignment - 1; \
__ leal(EDI, Address(EDI, scale_factor, fixed_size)); \
__ andl(EDI, Immediate(-kObjectAlignment)); \
@@ -555,11 +562,13 @@ bool Intrinsifier::ByteArrayBase_getLength(Assembler* assembler) {
#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; \
}
@@ -602,6 +611,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.h ('k') | runtime/vm/intrinsifier_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698