| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 868 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 879 return true; // Method is complete, no slow case. | 879 return true; // Method is complete, no slow case. |
| 880 } | 880 } |
| 881 | 881 |
| 882 | 882 |
| 883 static bool Double_isNegative(Assembler* assembler) { | 883 static bool Double_isNegative(Assembler* assembler) { |
| 884 const Bool& bool_true = Bool::ZoneHandle(Bool::True()); | 884 const Bool& bool_true = Bool::ZoneHandle(Bool::True()); |
| 885 const Bool& bool_false = Bool::ZoneHandle(Bool::False()); | 885 const Bool& bool_false = Bool::ZoneHandle(Bool::False()); |
| 886 Label is_false, is_true, is_zero; | 886 Label is_false, is_true, is_zero; |
| 887 __ movl(EAX, Address(ESP, +1 * kWordSize)); | 887 __ movl(EAX, Address(ESP, +1 * kWordSize)); |
| 888 __ movsd(XMM0, FieldAddress(EAX, Double::value_offset())); | 888 __ movsd(XMM0, FieldAddress(EAX, Double::value_offset())); |
| 889 __ xorps(XMM1, XMM1); // 0.0 -> XMM1. | 889 __ xorpd(XMM1, XMM1); // 0.0 -> XMM1. |
| 890 __ comisd(XMM0, XMM1); | 890 __ comisd(XMM0, XMM1); |
| 891 __ j(PARITY_EVEN, &is_false, Assembler::kNearJump); // NaN -> false. | 891 __ j(PARITY_EVEN, &is_false, Assembler::kNearJump); // NaN -> false. |
| 892 __ j(EQUAL, &is_zero, Assembler::kNearJump); // Check for negative zero. | 892 __ j(EQUAL, &is_zero, Assembler::kNearJump); // Check for negative zero. |
| 893 __ j(ABOVE_EQUAL, &is_false, Assembler::kNearJump); // >= 0 -> false. | 893 __ j(ABOVE_EQUAL, &is_false, Assembler::kNearJump); // >= 0 -> false. |
| 894 __ Bind(&is_true); | 894 __ Bind(&is_true); |
| 895 __ LoadObject(EAX, bool_true); | 895 __ LoadObject(EAX, bool_true); |
| 896 __ ret(); | 896 __ ret(); |
| 897 __ Bind(&is_false); | 897 __ Bind(&is_false); |
| 898 __ LoadObject(EAX, bool_false); | 898 __ LoadObject(EAX, bool_false); |
| 899 __ ret(); | 899 __ ret(); |
| (...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1161 } \ | 1161 } \ |
| 1162 | 1162 |
| 1163 INTRINSIC_LIST(FIND_INTRINSICS); | 1163 INTRINSIC_LIST(FIND_INTRINSICS); |
| 1164 #undef FIND_INTRINSICS | 1164 #undef FIND_INTRINSICS |
| 1165 return false; | 1165 return false; |
| 1166 } | 1166 } |
| 1167 | 1167 |
| 1168 } // namespace dart | 1168 } // namespace dart |
| 1169 | 1169 |
| 1170 #endif // defined TARGET_ARCH_IA32 | 1170 #endif // defined TARGET_ARCH_IA32 |
| OLD | NEW |