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

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

Issue 11267043: Small IL cleanup. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 1 month 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/intrinsifier_arm.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 1310 matching lines...) Expand 10 before | Expand all | Expand 10 after
1321 return CompareDoubles(assembler, EQUAL); 1321 return CompareDoubles(assembler, EQUAL);
1322 } 1322 }
1323 1323
1324 1324
1325 // arg0 is Double, arg1 is unknown. 1325 // arg0 is Double, arg1 is unknown.
1326 bool Intrinsifier::Double_lessEqualThan(Assembler* assembler) { 1326 bool Intrinsifier::Double_lessEqualThan(Assembler* assembler) {
1327 return CompareDoubles(assembler, BELOW_EQUAL); 1327 return CompareDoubles(assembler, BELOW_EQUAL);
1328 } 1328 }
1329 1329
1330 1330
1331 bool Intrinsifier::Double_toDouble(Assembler* assembler) {
1332 __ movl(EAX, Address(ESP, + 1 * kWordSize));
1333 __ ret();
1334 return true;
1335 }
1336
1337
1338 // Expects left argument to be double (receiver). Right argument is unknown. 1331 // Expects left argument to be double (receiver). Right argument is unknown.
1339 // Both arguments are on stack. 1332 // Both arguments are on stack.
1340 static bool DoubleArithmeticOperations(Assembler* assembler, Token::Kind kind) { 1333 static bool DoubleArithmeticOperations(Assembler* assembler, Token::Kind kind) {
1341 Label fall_through; 1334 Label fall_through;
1342 TestLastArgumentIsDouble(assembler, &fall_through, &fall_through); 1335 TestLastArgumentIsDouble(assembler, &fall_through, &fall_through);
1343 // Both arguments are double, right operand is in EAX. 1336 // Both arguments are double, right operand is in EAX.
1344 __ movsd(XMM1, FieldAddress(EAX, Double::value_offset())); 1337 __ movsd(XMM1, FieldAddress(EAX, Double::value_offset()));
1345 __ movl(EAX, Address(ESP, + 2 * kWordSize)); // Left argument. 1338 __ movl(EAX, Address(ESP, + 2 * kWordSize)); // Left argument.
1346 __ movsd(XMM0, FieldAddress(EAX, Double::value_offset())); 1339 __ movsd(XMM0, FieldAddress(EAX, Double::value_offset()));
1347 switch (kind) { 1340 switch (kind) {
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after
1732 __ Bind(&is_true); 1725 __ Bind(&is_true);
1733 __ LoadObject(EAX, bool_true); 1726 __ LoadObject(EAX, bool_true);
1734 __ ret(); 1727 __ ret();
1735 return true; 1728 return true;
1736 } 1729 }
1737 1730
1738 #undef __ 1731 #undef __
1739 } // namespace dart 1732 } // namespace dart
1740 1733
1741 #endif // defined TARGET_ARCH_IA32 1734 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « runtime/vm/intrinsifier_arm.cc ('k') | runtime/vm/intrinsifier_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698