Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(464)

Side by Side Diff: runtime/vm/intermediate_language_ia32.cc

Issue 10559072: Fuse Comparison->BooleanNegate->Branch. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/intermediate_language.cc ('k') | runtime/vm/intermediate_language_x64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/intermediate_language.h" 8 #include "vm/intermediate_language.h"
9 9
10 #include "lib/error.h" 10 #include "lib/error.h"
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after
525 left, 525 left,
526 right); 526 right);
527 compiler->LoadDoubleOrSmiToXmm(XMM0, left, temp, deopt); 527 compiler->LoadDoubleOrSmiToXmm(XMM0, left, temp, deopt);
528 compiler->LoadDoubleOrSmiToXmm(XMM1, right, temp, deopt); 528 compiler->LoadDoubleOrSmiToXmm(XMM1, right, temp, deopt);
529 529
530 Condition true_condition = TokenKindToDoubleCondition(comp->kind()); 530 Condition true_condition = TokenKindToDoubleCondition(comp->kind());
531 __ comisd(XMM0, XMM1); 531 __ comisd(XMM0, XMM1);
532 532
533 if (comp->is_fused_with_branch()) { 533 if (comp->is_fused_with_branch()) {
534 BranchInstr* branch = comp->fused_with_branch(); 534 BranchInstr* branch = comp->fused_with_branch();
535 __ j(PARITY_EVEN, compiler->GetBlockLabel(branch->false_successor())); 535 BlockEntryInstr* nan_result = branch->is_negated() ?
536 branch->true_successor() : branch->false_successor();
537 __ j(PARITY_EVEN, compiler->GetBlockLabel(nan_result));
536 branch->EmitBranchOnCondition(compiler, true_condition); 538 branch->EmitBranchOnCondition(compiler, true_condition);
537 } else { 539 } else {
538 Register result = comp->locs()->out().reg(); 540 Register result = comp->locs()->out().reg();
539 Label is_false, is_true, done; 541 Label is_false, is_true, done;
540 __ j(PARITY_EVEN, &is_false, Assembler::kNearJump); // NaN -> false; 542 __ j(PARITY_EVEN, &is_false, Assembler::kNearJump); // NaN -> false;
541 __ j(true_condition, &is_true, Assembler::kNearJump); 543 __ j(true_condition, &is_true, Assembler::kNearJump);
542 __ Bind(&is_false); 544 __ Bind(&is_false);
543 __ LoadObject(result, compiler->bool_false()); 545 __ LoadObject(result, compiler->bool_false());
544 __ jmp(&done); 546 __ jmp(&done);
545 __ Bind(&is_true); 547 __ Bind(&is_true);
(...skipping 1257 matching lines...) Expand 10 before | Expand all | Expand 10 after
1803 } 1805 }
1804 __ Bind(&done); 1806 __ Bind(&done);
1805 } 1807 }
1806 1808
1807 1809
1808 } // namespace dart 1810 } // namespace dart
1809 1811
1810 #undef __ 1812 #undef __
1811 1813
1812 #endif // defined TARGET_ARCH_X64 1814 #endif // defined TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language.cc ('k') | runtime/vm/intermediate_language_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698