| 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 524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 535 left, | 535 left, |
| 536 right); | 536 right); |
| 537 compiler->LoadDoubleOrSmiToXmm(XMM0, left, temp, deopt); | 537 compiler->LoadDoubleOrSmiToXmm(XMM0, left, temp, deopt); |
| 538 compiler->LoadDoubleOrSmiToXmm(XMM1, right, temp, deopt); | 538 compiler->LoadDoubleOrSmiToXmm(XMM1, right, temp, deopt); |
| 539 | 539 |
| 540 Condition true_condition = TokenKindToDoubleCondition(comp->kind()); | 540 Condition true_condition = TokenKindToDoubleCondition(comp->kind()); |
| 541 __ comisd(XMM0, XMM1); | 541 __ comisd(XMM0, XMM1); |
| 542 | 542 |
| 543 if (comp->is_fused_with_branch()) { | 543 if (comp->is_fused_with_branch()) { |
| 544 BranchInstr* branch = comp->fused_with_branch(); | 544 BranchInstr* branch = comp->fused_with_branch(); |
| 545 __ j(PARITY_EVEN, compiler->GetBlockLabel(branch->false_successor())); | 545 BlockEntryInstr* nan_result = branch->is_negated() ? |
| 546 branch->true_successor() : branch->false_successor(); |
| 547 __ j(PARITY_EVEN, compiler->GetBlockLabel(nan_result)); |
| 546 branch->EmitBranchOnCondition(compiler, true_condition); | 548 branch->EmitBranchOnCondition(compiler, true_condition); |
| 547 } else { | 549 } else { |
| 548 Register result = comp->locs()->out().reg(); | 550 Register result = comp->locs()->out().reg(); |
| 549 Label is_false, is_true, done; | 551 Label is_false, is_true, done; |
| 550 __ j(PARITY_EVEN, &is_false, Assembler::kNearJump); | 552 __ j(PARITY_EVEN, &is_false, Assembler::kNearJump); |
| 551 __ j(true_condition, &is_true, Assembler::kNearJump); | 553 __ j(true_condition, &is_true, Assembler::kNearJump); |
| 552 __ Bind(&is_false); | 554 __ Bind(&is_false); |
| 553 __ LoadObject(result, compiler->bool_false()); | 555 __ LoadObject(result, compiler->bool_false()); |
| 554 __ jmp(&done); | 556 __ jmp(&done); |
| 555 __ Bind(&is_true); | 557 __ Bind(&is_true); |
| (...skipping 1259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1815 instance_call()->argument_names()); | 1817 instance_call()->argument_names()); |
| 1816 } | 1818 } |
| 1817 __ Bind(&done); | 1819 __ Bind(&done); |
| 1818 } | 1820 } |
| 1819 | 1821 |
| 1820 } // namespace dart | 1822 } // namespace dart |
| 1821 | 1823 |
| 1822 #undef __ | 1824 #undef __ |
| 1823 | 1825 |
| 1824 #endif // defined TARGET_ARCH_X64 | 1826 #endif // defined TARGET_ARCH_X64 |
| OLD | NEW |