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

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

Issue 10701147: Implement more intrinisification for x64 (not as inlined code but as header of the target). (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 5 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
« no previous file with comments | « runtime/vm/assembler_x64_test.cc ('k') | runtime/vm/intrinsifier_x64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // The intrinsic code below is executed before a method has built its frame. 5 // The intrinsic code below is executed before a method has built its frame.
6 // The return address is on the stack and the arguments below it. 6 // The return address is on the stack and the arguments below it.
7 // Registers EDX (arguments descriptor) and ECX (function) must be preserved. 7 // Registers EDX (arguments descriptor) and ECX (function) must be preserved.
8 // Each intrinsification method returns true if the corresponding 8 // Each intrinsification method returns true if the corresponding
9 // Dart method was intrinsified. 9 // Dart method was intrinsified.
10 10
(...skipping 1114 matching lines...) Expand 10 before | Expand all | Expand 10 after
1125 __ j(NOT_ZERO, &is_true, Assembler::kNearJump); 1125 __ j(NOT_ZERO, &is_true, Assembler::kNearJump);
1126 __ jmp(&is_false, Assembler::kNearJump); 1126 __ jmp(&is_false, Assembler::kNearJump);
1127 return true; // Method is complete, no slow case. 1127 return true; // Method is complete, no slow case.
1128 } 1128 }
1129 1129
1130 1130
1131 // Argument type is not known 1131 // Argument type is not known
1132 bool Intrinsifier::Math_sqrt(Assembler* assembler) { 1132 bool Intrinsifier::Math_sqrt(Assembler* assembler) {
1133 Label fall_through, is_smi, double_op; 1133 Label fall_through, is_smi, double_op;
1134 TestLastArgumentIsDouble(assembler, &is_smi, &fall_through); 1134 TestLastArgumentIsDouble(assembler, &is_smi, &fall_through);
1135 // Argument is double and is in EAX, class in EBX. 1135 // Argument is double and is in EAX.
1136 __ movsd(XMM1, FieldAddress(EAX, Double::value_offset())); 1136 __ movsd(XMM1, FieldAddress(EAX, Double::value_offset()));
1137 __ Bind(&double_op); 1137 __ Bind(&double_op);
1138 __ sqrtsd(XMM0, XMM1); 1138 __ sqrtsd(XMM0, XMM1);
1139 const Class& double_class = Class::Handle( 1139 const Class& double_class = Class::Handle(
1140 Isolate::Current()->object_store()->double_class()); 1140 Isolate::Current()->object_store()->double_class());
1141 AssemblerMacros::TryAllocate(assembler, 1141 AssemblerMacros::TryAllocate(assembler,
1142 double_class, 1142 double_class,
1143 &fall_through, 1143 &fall_through,
1144 EAX); // Result register. 1144 EAX); // Result register.
1145 __ movsd(FieldAddress(EAX, Double::value_offset()), XMM0); 1145 __ movsd(FieldAddress(EAX, Double::value_offset()), XMM0);
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
1364 __ Bind(&is_true); 1364 __ Bind(&is_true);
1365 __ LoadObject(EAX, bool_true); 1365 __ LoadObject(EAX, bool_true);
1366 __ ret(); 1366 __ ret();
1367 return true; 1367 return true;
1368 } 1368 }
1369 1369
1370 #undef __ 1370 #undef __
1371 } // namespace dart 1371 } // namespace dart
1372 1372
1373 #endif // defined TARGET_ARCH_IA32 1373 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « runtime/vm/assembler_x64_test.cc ('k') | runtime/vm/intrinsifier_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698