Chromium Code Reviews| OLD | NEW |
|---|---|
| 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_IA32. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_IA32. |
| 6 #if defined(TARGET_ARCH_IA32) | 6 #if defined(TARGET_ARCH_IA32) |
| 7 | 7 |
| 8 #include "vm/flow_graph_compiler.h" | 8 #include "vm/flow_graph_compiler.h" |
| 9 | 9 |
| 10 #include "lib/error.h" | 10 #include "lib/error.h" |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 79 __ CompareClassId(EAX, kDouble, EBX); | 79 __ CompareClassId(EAX, kDouble, EBX); |
| 80 __ j(NOT_EQUAL, &call_method); | 80 __ j(NOT_EQUAL, &call_method); |
| 81 __ movsd(XMM1, FieldAddress(EAX, Double::value_offset())); | 81 __ movsd(XMM1, FieldAddress(EAX, Double::value_offset())); |
| 82 __ Bind(&double_op); | 82 __ Bind(&double_op); |
| 83 __ sqrtsd(XMM0, XMM1); | 83 __ sqrtsd(XMM0, XMM1); |
| 84 AssemblerMacros::TryAllocate(assembler_, | 84 AssemblerMacros::TryAllocate(assembler_, |
| 85 double_class_, | 85 double_class_, |
| 86 &call_method, | 86 &call_method, |
| 87 EAX); // Result register. | 87 EAX); // Result register. |
| 88 __ movsd(FieldAddress(EAX, Double::value_offset()), XMM0); | 88 __ movsd(FieldAddress(EAX, Double::value_offset()), XMM0); |
| 89 __ Drop(1); | |
|
siva
2012/06/21 00:39:59
Could you add a comment here explaining that the a
| |
| 89 __ jmp(done); | 90 __ jmp(done); |
| 90 __ Bind(&smi_to_double); | 91 __ Bind(&smi_to_double); |
| 91 __ SmiUntag(EAX); | 92 __ SmiUntag(EAX); |
| 92 __ cvtsi2sd(XMM1, EAX); | 93 __ cvtsi2sd(XMM1, EAX); |
| 93 __ jmp(&double_op); | 94 __ jmp(&double_op); |
| 94 __ Bind(&call_method); | 95 __ Bind(&call_method); |
| 95 } | 96 } |
| 96 | 97 |
| 97 | 98 |
| 98 void FlowGraphCompiler::GenerateCall(intptr_t token_index, | 99 void FlowGraphCompiler::GenerateCall(intptr_t token_index, |
| (...skipping 946 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1045 __ cvtsi2sd(result, temp); | 1046 __ cvtsi2sd(result, temp); |
| 1046 __ Bind(&done); | 1047 __ Bind(&done); |
| 1047 } | 1048 } |
| 1048 | 1049 |
| 1049 | 1050 |
| 1050 #undef __ | 1051 #undef __ |
| 1051 | 1052 |
| 1052 } // namespace dart | 1053 } // namespace dart |
| 1053 | 1054 |
| 1054 #endif // defined TARGET_ARCH_IA32 | 1055 #endif // defined TARGET_ARCH_IA32 |
| OLD | NEW |