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

Side by Side Diff: src/compiler/arm64/code-generator-arm64.cc

Issue 850073002: [turbofan] Allow 0.0 as immediate for floating-point comparison on arm/arm64. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 11 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
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/compiler/code-generator.h" 5 #include "src/compiler/code-generator.h"
6 6
7 #include "src/arm64/macro-assembler-arm64.h" 7 #include "src/arm64/macro-assembler-arm64.h"
8 #include "src/compiler/code-generator-impl.h" 8 #include "src/compiler/code-generator-impl.h"
9 #include "src/compiler/gap-resolver.h" 9 #include "src/compiler/gap-resolver.h"
10 #include "src/compiler/node-matchers.h" 10 #include "src/compiler/node-matchers.h"
(...skipping 606 matching lines...) Expand 10 before | Expand all | Expand 10 after
617 case kArm64Cmn32: 617 case kArm64Cmn32:
618 __ Cmn(i.InputRegister32(0), i.InputOperand32(1)); 618 __ Cmn(i.InputRegister32(0), i.InputOperand32(1));
619 break; 619 break;
620 case kArm64Tst: 620 case kArm64Tst:
621 __ Tst(i.InputRegister(0), i.InputOperand(1)); 621 __ Tst(i.InputRegister(0), i.InputOperand(1));
622 break; 622 break;
623 case kArm64Tst32: 623 case kArm64Tst32:
624 __ Tst(i.InputRegister32(0), i.InputOperand32(1)); 624 __ Tst(i.InputRegister32(0), i.InputOperand32(1));
625 break; 625 break;
626 case kArm64Float64Cmp: 626 case kArm64Float64Cmp:
627 __ Fcmp(i.InputDoubleRegister(0), i.InputDoubleRegister(1)); 627 if (instr->InputAt(1)->IsDoubleRegister()) {
628 __ Fcmp(i.InputDoubleRegister(0), i.InputDoubleRegister(1));
629 } else {
630 DCHECK(instr->InputAt(1)->IsImmediate());
631 // 0.0 is the only immediate supported by fcmp instructions.
632 DCHECK(i.InputDouble(1) == 0.0);
633 __ Fcmp(i.InputDoubleRegister(0), i.InputDouble(1));
634 }
628 break; 635 break;
629 case kArm64Float64Add: 636 case kArm64Float64Add:
630 __ Fadd(i.OutputDoubleRegister(), i.InputDoubleRegister(0), 637 __ Fadd(i.OutputDoubleRegister(), i.InputDoubleRegister(0),
631 i.InputDoubleRegister(1)); 638 i.InputDoubleRegister(1));
632 break; 639 break;
633 case kArm64Float64Sub: 640 case kArm64Float64Sub:
634 __ Fsub(i.OutputDoubleRegister(), i.InputDoubleRegister(0), 641 __ Fsub(i.OutputDoubleRegister(), i.InputDoubleRegister(0),
635 i.InputDoubleRegister(1)); 642 i.InputDoubleRegister(1));
636 break; 643 break;
637 case kArm64Float64Mul: 644 case kArm64Float64Mul:
(...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after
1104 } 1111 }
1105 } 1112 }
1106 MarkLazyDeoptSite(); 1113 MarkLazyDeoptSite();
1107 } 1114 }
1108 1115
1109 #undef __ 1116 #undef __
1110 1117
1111 } // namespace compiler 1118 } // namespace compiler
1112 } // namespace internal 1119 } // namespace internal
1113 } // namespace v8 1120 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/arm/instruction-selector-arm.cc ('k') | src/compiler/arm64/instruction-selector-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698