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

Unified Diff: runtime/vm/intrinsifier_x64.cc

Issue 10911153: Intrinsify Float32Array_getIndexed on IA32 and X64. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 3 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
« runtime/vm/intrinsifier_ia32.cc ('K') | « runtime/vm/intrinsifier_ia32.cc ('k') | no next file » | 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 15a9c865ce6ecff3aedc0a60c7087cd79a897908..ff313c0ebc950769a4aa99b59d8fe94d2a7a2f07 100644
--- a/runtime/vm/intrinsifier_x64.cc
+++ b/runtime/vm/intrinsifier_x64.cc
@@ -512,6 +512,36 @@ bool Intrinsifier::Uint32Array_getIndexed(Assembler* assembler) {
return false;
}
+bool Intrinsifier::Float32Array_getIndexed(Assembler* assembler) {
+ Label fall_through;
+ TestByteArrayIndex(assembler, &fall_through);
+ // After TestByteArrayIndex:
+ // RAX has the base address of the byte array
+ // RBX has the index into the array
+
+ // Load single precision float into XMM7
+ __ movss(XMM7, FieldAddress(RAX, RBX, TIMES_4,
+ Float32Array::data_offset()));
+ // Convert into a double precision float
+ __ cvtss2sd(XMM6, XMM7);
+ // Allocate a double instance
+ const Class& double_class = Class::Handle(
+ Isolate::Current()->object_store()->double_class());
+ AssemblerMacros::TryAllocate(assembler,
+ double_class,
+ &fall_through,
+ Assembler::kNearJump, RAX);
+ // Store XMM6 into double instance
srdjan 2012/09/09 14:26:52 ditto for comments here
Cutch 2012/09/10 14:44:43 Done.
+ __ movsd(FieldAddress(RAX, Double::value_offset()), XMM6);
+ __ ret();
+ __ Bind(&fall_through);
+ return false;
+}
+
+bool Intrinsifier::Float32Array_setIndexed(Assembler* assembler) {
+ return false;
+}
+
// Tests if two top most arguments are smis, jumps to label not_smi if not.
// Topmost argument is in RAX.
« runtime/vm/intrinsifier_ia32.cc ('K') | « runtime/vm/intrinsifier_ia32.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698