OLD | NEW |
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 #include "src/compiler/code-generator-impl.h" | 6 #include "src/compiler/code-generator-impl.h" |
7 #include "src/compiler/gap-resolver.h" | 7 #include "src/compiler/gap-resolver.h" |
8 #include "src/compiler/node-matchers.h" | 8 #include "src/compiler/node-matchers.h" |
9 #include "src/mips/macro-assembler-mips.h" | 9 #include "src/mips/macro-assembler-mips.h" |
10 #include "src/scopes.h" | 10 #include "src/scopes.h" |
(...skipping 842 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
853 if (!branch->fallthru) __ Branch(flabel); // no fallthru to flabel. | 853 if (!branch->fallthru) __ Branch(flabel); // no fallthru to flabel. |
854 | 854 |
855 } else if (instr->arch_opcode() == kMipsCmpS) { | 855 } else if (instr->arch_opcode() == kMipsCmpS) { |
856 // TODO(dusmil) optimize unordered checks to use fewer instructions | 856 // TODO(dusmil) optimize unordered checks to use fewer instructions |
857 // even if we have to unfold BranchF macro. | 857 // even if we have to unfold BranchF macro. |
858 bool acceptNaN = false; | 858 bool acceptNaN = false; |
859 if (!convertCondition(branch->condition, cc, acceptNaN)) { | 859 if (!convertCondition(branch->condition, cc, acceptNaN)) { |
860 UNSUPPORTED_COND(kMips64CmpS, branch->condition); | 860 UNSUPPORTED_COND(kMips64CmpS, branch->condition); |
861 } | 861 } |
862 Label* nan = acceptNaN ? tlabel : flabel; | 862 Label* nan = acceptNaN ? tlabel : flabel; |
863 __ BranchFS(tlabel, nan, cc, i.InputSingleRegister(0), | 863 __ BranchF32(tlabel, nan, cc, i.InputSingleRegister(0), |
864 i.InputSingleRegister(1)); | 864 i.InputSingleRegister(1)); |
865 | 865 |
866 if (!branch->fallthru) __ Branch(flabel); // no fallthru to flabel. | 866 if (!branch->fallthru) __ Branch(flabel); // no fallthru to flabel. |
867 | 867 |
868 } else if (instr->arch_opcode() == kMipsCmpD) { | 868 } else if (instr->arch_opcode() == kMipsCmpD) { |
869 // TODO(dusmil) optimize unordered checks to use fewer instructions | 869 // TODO(dusmil) optimize unordered checks to use fewer instructions |
870 // even if we have to unfold BranchF macro. | 870 // even if we have to unfold BranchF macro. |
871 bool acceptNaN = false; | 871 bool acceptNaN = false; |
872 if (!convertCondition(branch->condition, cc, acceptNaN)) { | 872 if (!convertCondition(branch->condition, cc, acceptNaN)) { |
873 UNSUPPORTED_COND(kMips64CmpD, branch->condition); | 873 UNSUPPORTED_COND(kMips64CmpD, branch->condition); |
874 } | 874 } |
875 Label* nan = acceptNaN ? tlabel : flabel; | 875 Label* nan = acceptNaN ? tlabel : flabel; |
876 __ BranchF(tlabel, nan, cc, i.InputDoubleRegister(0), | 876 __ BranchF64(tlabel, nan, cc, i.InputDoubleRegister(0), |
877 i.InputDoubleRegister(1)); | 877 i.InputDoubleRegister(1)); |
878 | 878 |
879 if (!branch->fallthru) __ Branch(flabel); // no fallthru to flabel. | 879 if (!branch->fallthru) __ Branch(flabel); // no fallthru to flabel. |
880 | 880 |
881 } else { | 881 } else { |
882 PrintF("AssembleArchBranch Unimplemented arch_opcode: %d\n", | 882 PrintF("AssembleArchBranch Unimplemented arch_opcode: %d\n", |
883 instr->arch_opcode()); | 883 instr->arch_opcode()); |
884 UNIMPLEMENTED(); | 884 UNIMPLEMENTED(); |
885 } | 885 } |
886 } | 886 } |
887 | 887 |
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1284 } | 1284 } |
1285 } | 1285 } |
1286 MarkLazyDeoptSite(); | 1286 MarkLazyDeoptSite(); |
1287 } | 1287 } |
1288 | 1288 |
1289 #undef __ | 1289 #undef __ |
1290 | 1290 |
1291 } // namespace compiler | 1291 } // namespace compiler |
1292 } // namespace internal | 1292 } // namespace internal |
1293 } // namespace v8 | 1293 } // namespace v8 |
OLD | NEW |