| 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 922 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 933 return false; | 933 return false; |
| 934 } | 934 } |
| 935 | 935 |
| 936 | 936 |
| 937 enum TrigonometricFunctions { | 937 enum TrigonometricFunctions { |
| 938 kSine, | 938 kSine, |
| 939 kCosine, | 939 kCosine, |
| 940 }; | 940 }; |
| 941 | 941 |
| 942 | 942 |
| 943 static bool EmitTrigonometric(Assembler* assembler, | 943 static void EmitTrigonometric(Assembler* assembler, |
| 944 TrigonometricFunctions kind) { | 944 TrigonometricFunctions kind) { |
| 945 Label fall_through, is_smi, double_op; | 945 Label fall_through, is_smi, double_op; |
| 946 TestLastArgumentIsDouble(assembler, &is_smi, &fall_through); | 946 TestLastArgumentIsDouble(assembler, &is_smi, &fall_through); |
| 947 // Argument is double and is in EAX. | 947 // Argument is double and is in EAX. |
| 948 __ fldl(FieldAddress(EAX, Double::value_offset())); | 948 __ fldl(FieldAddress(EAX, Double::value_offset())); |
| 949 __ Bind(&double_op); | 949 __ Bind(&double_op); |
| 950 switch (kind) { | 950 switch (kind) { |
| 951 case kSine: __ fsin(); break; | 951 case kSine: __ fsin(); break; |
| 952 case kCosine: __ fcos(); break; | 952 case kCosine: __ fcos(); break; |
| 953 default: | 953 default: |
| (...skipping 207 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 |