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

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

Issue 11783006: Intrinsify Uint8ClampedArray's store and load indexed, inline load indexed. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 11 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_IA32. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_IA32.
6 #if defined(TARGET_ARCH_IA32) 6 #if defined(TARGET_ARCH_IA32)
7 7
8 #include "vm/intermediate_language.h" 8 #include "vm/intermediate_language.h"
9 9
10 #include "lib/error.h" 10 #include "lib/error.h"
(...skipping 1188 matching lines...) Expand 10 before | Expand all | Expand 10 after
1199 // Promote to double. 1199 // Promote to double.
1200 __ cvtss2sd(result, locs()->out().xmm_reg()); 1200 __ cvtss2sd(result, locs()->out().xmm_reg());
1201 } else { 1201 } else {
1202 ASSERT(class_id() == kFloat64ArrayCid); 1202 ASSERT(class_id() == kFloat64ArrayCid);
1203 __ movsd(result, element_address); 1203 __ movsd(result, element_address);
1204 } 1204 }
1205 return; 1205 return;
1206 } 1206 }
1207 1207
1208 Register result = locs()->out().reg(); 1208 Register result = locs()->out().reg();
1209 if (class_id() == kUint8ArrayCid) { 1209 if ((class_id() == kUint8ArrayCid) ||
1210 (class_id() == kUint8ClampedArrayCid)) {
1210 if (index.IsRegister()) { 1211 if (index.IsRegister()) {
1211 __ SmiUntag(index.reg()); 1212 __ SmiUntag(index.reg());
1212 } 1213 }
1213 __ movzxb(result, element_address); 1214 __ movzxb(result, element_address);
1214 __ SmiTag(result); 1215 __ SmiTag(result);
1215 if (index.IsRegister()) { 1216 if (index.IsRegister()) {
1216 __ SmiTag(index.reg()); // Re-tag. 1217 __ SmiTag(index.reg()); // Re-tag.
1217 } 1218 }
1218 return; 1219 return;
1219 } 1220 }
(...skipping 1593 matching lines...) Expand 10 before | Expand all | Expand 10 after
2813 __ pcmpeqq(XMM0, XMM0); // Generate all 1's. 2814 __ pcmpeqq(XMM0, XMM0); // Generate all 1's.
2814 __ pxor(value, XMM0); 2815 __ pxor(value, XMM0);
2815 } 2816 }
2816 2817
2817 2818
2818 } // namespace dart 2819 } // namespace dart
2819 2820
2820 #undef __ 2821 #undef __
2821 2822
2822 #endif // defined TARGET_ARCH_X64 2823 #endif // defined TARGET_ARCH_X64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698