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

Side by Side Diff: runtime/vm/intrinsifier_x64.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_ia32.cc ('k') | no next file » | 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 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64.
6 #if defined(TARGET_ARCH_X64) 6 #if defined(TARGET_ARCH_X64)
7 7
8 #include "vm/intrinsifier.h" 8 #include "vm/intrinsifier.h"
9 9
10 #include "vm/assembler.h" 10 #include "vm/assembler.h"
(...skipping 1129 matching lines...) Expand 10 before | Expand all | Expand 10 after
1140 bool Intrinsifier::Double_equal(Assembler* assembler) { 1140 bool Intrinsifier::Double_equal(Assembler* assembler) {
1141 return CompareDoubles(assembler, EQUAL); 1141 return CompareDoubles(assembler, EQUAL);
1142 } 1142 }
1143 1143
1144 1144
1145 bool Intrinsifier::Double_lessEqualThan(Assembler* assembler) { 1145 bool Intrinsifier::Double_lessEqualThan(Assembler* assembler) {
1146 return CompareDoubles(assembler, BELOW_EQUAL); 1146 return CompareDoubles(assembler, BELOW_EQUAL);
1147 } 1147 }
1148 1148
1149 1149
1150 bool Intrinsifier::Double_toDouble(Assembler* assembler) {
1151 __ movq(RAX, Address(RSP, + 1 * kWordSize));
1152 __ ret();
1153 // Generate enough code to satisfy patchability constraint.
1154 intptr_t offset = __ CodeSize();
1155 __ nop(JumpPattern::InstructionLength() - offset);
1156 return true;
1157 }
1158
1159
1160 // Expects left argument to be double (receiver). Right argument is unknown. 1150 // Expects left argument to be double (receiver). Right argument is unknown.
1161 // Both arguments are on stack. 1151 // Both arguments are on stack.
1162 static bool DoubleArithmeticOperations(Assembler* assembler, Token::Kind kind) { 1152 static bool DoubleArithmeticOperations(Assembler* assembler, Token::Kind kind) {
1163 Label fall_through; 1153 Label fall_through;
1164 TestLastArgumentIsDouble(assembler, &fall_through, &fall_through); 1154 TestLastArgumentIsDouble(assembler, &fall_through, &fall_through);
1165 // Both arguments are double, right operand is in RAX. 1155 // Both arguments are double, right operand is in RAX.
1166 __ movsd(XMM1, FieldAddress(RAX, Double::value_offset())); 1156 __ movsd(XMM1, FieldAddress(RAX, Double::value_offset()));
1167 __ movq(RAX, Address(RSP, + 2 * kWordSize)); // Left argument. 1157 __ movq(RAX, Address(RSP, + 2 * kWordSize)); // Left argument.
1168 __ movsd(XMM0, FieldAddress(RAX, Double::value_offset())); 1158 __ movsd(XMM0, FieldAddress(RAX, Double::value_offset()));
1169 switch (kind) { 1159 switch (kind) {
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after
1567 __ LoadObject(RAX, bool_true); 1557 __ LoadObject(RAX, bool_true);
1568 __ ret(); 1558 __ ret();
1569 return true; 1559 return true;
1570 } 1560 }
1571 1561
1572 #undef __ 1562 #undef __
1573 1563
1574 } // namespace dart 1564 } // namespace dart
1575 1565
1576 #endif // defined TARGET_ARCH_X64 1566 #endif // defined TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « runtime/vm/intrinsifier_ia32.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698