| 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 907 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 918 | 918 |
| 919 if (!branch->fallthru) __ Branch(flabel); // no fallthru to flabel. | 919 if (!branch->fallthru) __ Branch(flabel); // no fallthru to flabel. |
| 920 } else if (instr->arch_opcode() == kMips64CmpS) { | 920 } else if (instr->arch_opcode() == kMips64CmpS) { |
| 921 // TODO(dusmil) optimize unordered checks to use fewer instructions | 921 // TODO(dusmil) optimize unordered checks to use fewer instructions |
| 922 // even if we have to unfold BranchF macro. | 922 // even if we have to unfold BranchF macro. |
| 923 bool acceptNaN = false; | 923 bool acceptNaN = false; |
| 924 if (!convertCondition(branch->condition, cc, acceptNaN)) { | 924 if (!convertCondition(branch->condition, cc, acceptNaN)) { |
| 925 UNSUPPORTED_COND(kMips64CmpS, branch->condition); | 925 UNSUPPORTED_COND(kMips64CmpS, branch->condition); |
| 926 } | 926 } |
| 927 Label* nan = acceptNaN ? tlabel : flabel; | 927 Label* nan = acceptNaN ? tlabel : flabel; |
| 928 __ BranchFS(tlabel, nan, cc, i.InputSingleRegister(0), | 928 __ BranchF32(tlabel, nan, cc, i.InputSingleRegister(0), |
| 929 i.InputSingleRegister(1)); | 929 i.InputSingleRegister(1)); |
| 930 | 930 |
| 931 if (!branch->fallthru) __ Branch(flabel); // no fallthru to flabel. | 931 if (!branch->fallthru) __ Branch(flabel); // no fallthru to flabel. |
| 932 | 932 |
| 933 } else if (instr->arch_opcode() == kMips64CmpD) { | 933 } else if (instr->arch_opcode() == kMips64CmpD) { |
| 934 // TODO(dusmil) optimize unordered checks to use less instructions | 934 // TODO(dusmil) optimize unordered checks to use less instructions |
| 935 // even if we have to unfold BranchF macro. | 935 // even if we have to unfold BranchF macro. |
| 936 bool acceptNaN = false; | 936 bool acceptNaN = false; |
| 937 if (!convertCondition(branch->condition, cc, acceptNaN)) { | 937 if (!convertCondition(branch->condition, cc, acceptNaN)) { |
| 938 UNSUPPORTED_COND(kMips64CmpD, branch->condition); | 938 UNSUPPORTED_COND(kMips64CmpD, branch->condition); |
| 939 } | 939 } |
| 940 Label* nan = acceptNaN ? tlabel : flabel; | 940 Label* nan = acceptNaN ? tlabel : flabel; |
| 941 __ BranchF(tlabel, nan, cc, i.InputDoubleRegister(0), | 941 __ BranchF64(tlabel, nan, cc, i.InputDoubleRegister(0), |
| 942 i.InputDoubleRegister(1)); | 942 i.InputDoubleRegister(1)); |
| 943 | 943 |
| 944 if (!branch->fallthru) __ Branch(flabel); // no fallthru to flabel. | 944 if (!branch->fallthru) __ Branch(flabel); // no fallthru to flabel. |
| 945 } else { | 945 } else { |
| 946 PrintF("AssembleArchBranch Unimplemented arch_opcode: %d\n", | 946 PrintF("AssembleArchBranch Unimplemented arch_opcode: %d\n", |
| 947 instr->arch_opcode()); | 947 instr->arch_opcode()); |
| 948 UNIMPLEMENTED(); | 948 UNIMPLEMENTED(); |
| 949 } | 949 } |
| 950 } | 950 } |
| 951 | 951 |
| 952 | 952 |
| (...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1350 } | 1350 } |
| 1351 } | 1351 } |
| 1352 MarkLazyDeoptSite(); | 1352 MarkLazyDeoptSite(); |
| 1353 } | 1353 } |
| 1354 | 1354 |
| 1355 #undef __ | 1355 #undef __ |
| 1356 | 1356 |
| 1357 } // namespace compiler | 1357 } // namespace compiler |
| 1358 } // namespace internal | 1358 } // namespace internal |
| 1359 } // namespace v8 | 1359 } // namespace v8 |
| OLD | NEW |