| 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_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/intermediate_language.h" | 8 #include "vm/intermediate_language.h" |
| 9 | 9 |
| 10 #include "lib/error.h" | 10 #include "lib/error.h" |
| (...skipping 1400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1411 const Class& double_class = | 1411 const Class& double_class = |
| 1412 Class::ZoneHandle(Isolate::Current()->object_store()->double_class()); | 1412 Class::ZoneHandle(Isolate::Current()->object_store()->double_class()); |
| 1413 const Code& stub = | 1413 const Code& stub = |
| 1414 Code::Handle(StubCode::GetAllocationStubForClass(double_class)); | 1414 Code::Handle(StubCode::GetAllocationStubForClass(double_class)); |
| 1415 const ExternalLabel label(double_class.ToCString(), stub.EntryPoint()); | 1415 const ExternalLabel label(double_class.ToCString(), stub.EntryPoint()); |
| 1416 __ pushq(value); | 1416 __ pushq(value); |
| 1417 compiler->GenerateCall(instance_call()->token_index(), | 1417 compiler->GenerateCall(instance_call()->token_index(), |
| 1418 instance_call()->try_index(), | 1418 instance_call()->try_index(), |
| 1419 &label, | 1419 &label, |
| 1420 PcDescriptors::kOther); | 1420 PcDescriptors::kOther); |
| 1421 // Result is in EAX. | 1421 // Result is in RAX. |
| 1422 ASSERT(result != temp); |
| 1422 __ movq(result, RAX); | 1423 __ movq(result, RAX); |
| 1423 __ popq(temp); | 1424 __ popq(temp); |
| 1424 __ movsd(XMM0, FieldAddress(temp, Double::value_offset())); | 1425 __ movsd(XMM0, FieldAddress(temp, Double::value_offset())); |
| 1425 __ DoubleNegate(XMM0); | 1426 __ DoubleNegate(XMM0); |
| 1426 __ movsd(FieldAddress(result, Double::value_offset()), XMM0); | 1427 __ movsd(FieldAddress(result, Double::value_offset()), XMM0); |
| 1427 } else { | 1428 } else { |
| 1428 UNREACHABLE(); | 1429 UNREACHABLE(); |
| 1429 } | 1430 } |
| 1430 } | 1431 } |
| 1431 | 1432 |
| 1432 } // namespace dart | 1433 } // namespace dart |
| 1433 | 1434 |
| 1434 #undef __ | 1435 #undef __ |
| 1435 | 1436 |
| 1436 #endif // defined TARGET_ARCH_X64 | 1437 #endif // defined TARGET_ARCH_X64 |
| OLD | NEW |