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_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 1381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1392 const Class& double_class = | 1392 const Class& double_class = |
| 1393 Class::ZoneHandle(Isolate::Current()->object_store()->double_class()); | 1393 Class::ZoneHandle(Isolate::Current()->object_store()->double_class()); |
| 1394 const Code& stub = | 1394 const Code& stub = |
| 1395 Code::Handle(StubCode::GetAllocationStubForClass(double_class)); | 1395 Code::Handle(StubCode::GetAllocationStubForClass(double_class)); |
| 1396 const ExternalLabel label(double_class.ToCString(), stub.EntryPoint()); | 1396 const ExternalLabel label(double_class.ToCString(), stub.EntryPoint()); |
| 1397 __ pushq(value); | 1397 __ pushq(value); |
| 1398 compiler->GenerateCall(instance_call()->token_index(), | 1398 compiler->GenerateCall(instance_call()->token_index(), |
| 1399 instance_call()->try_index(), | 1399 instance_call()->try_index(), |
| 1400 &label, | 1400 &label, |
| 1401 PcDescriptors::kOther); | 1401 PcDescriptors::kOther); |
| 1402 // Result is in EAX. | 1402 // Result is in RAX. |
| 1403 ASSERT(result != temp); | |
| 1403 __ movq(result, RAX); | 1404 __ movq(result, RAX); |
|
Florian Schneider
2012/06/01 15:49:10
Maybe avoid the move if result == RAX.
srdjan
2012/06/01 18:27:25
ditto.
| |
| 1404 __ popq(temp); | 1405 __ popq(temp); |
| 1405 __ movsd(XMM0, FieldAddress(temp, Double::value_offset())); | 1406 __ movsd(XMM0, FieldAddress(temp, Double::value_offset())); |
| 1406 __ DoubleNegate(XMM0); | 1407 __ DoubleNegate(XMM0); |
| 1407 __ movsd(FieldAddress(result, Double::value_offset()), XMM0); | 1408 __ movsd(FieldAddress(result, Double::value_offset()), XMM0); |
| 1408 } else { | 1409 } else { |
| 1409 UNREACHABLE(); | 1410 UNREACHABLE(); |
| 1410 } | 1411 } |
| 1411 } | 1412 } |
| 1412 | 1413 |
| 1413 } // namespace dart | 1414 } // namespace dart |
| 1414 | 1415 |
| 1415 #undef __ | 1416 #undef __ |
| 1416 | 1417 |
| 1417 #endif // defined TARGET_ARCH_X64 | 1418 #endif // defined TARGET_ARCH_X64 |
| OLD | NEW |