OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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/compiler/code-generator-impl.h" | 7 #include "src/compiler/code-generator-impl.h" |
8 #include "src/compiler/gap-resolver.h" | 8 #include "src/compiler/gap-resolver.h" |
9 #include "src/compiler/node-matchers.h" | 9 #include "src/compiler/node-matchers.h" |
10 #include "src/compiler/osr.h" | 10 #include "src/compiler/osr.h" |
(...skipping 1008 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1019 break; | 1019 break; |
1020 case kUnsignedGreaterThan: | 1020 case kUnsignedGreaterThan: |
1021 __ j(above, tlabel); | 1021 __ j(above, tlabel); |
1022 break; | 1022 break; |
1023 case kOverflow: | 1023 case kOverflow: |
1024 __ j(overflow, tlabel); | 1024 __ j(overflow, tlabel); |
1025 break; | 1025 break; |
1026 case kNotOverflow: | 1026 case kNotOverflow: |
1027 __ j(no_overflow, tlabel); | 1027 __ j(no_overflow, tlabel); |
1028 break; | 1028 break; |
| 1029 default: |
| 1030 UNREACHABLE(); |
| 1031 break; |
1029 } | 1032 } |
1030 // Add a jump if not falling through to the next block. | 1033 // Add a jump if not falling through to the next block. |
1031 if (!branch->fallthru) __ jmp(flabel); | 1034 if (!branch->fallthru) __ jmp(flabel); |
1032 } | 1035 } |
1033 | 1036 |
1034 | 1037 |
1035 void CodeGenerator::AssembleArchJump(RpoNumber target) { | 1038 void CodeGenerator::AssembleArchJump(RpoNumber target) { |
1036 if (!IsNextInAssemblyOrder(target)) __ jmp(GetLabel(target)); | 1039 if (!IsNextInAssemblyOrder(target)) __ jmp(GetLabel(target)); |
1037 } | 1040 } |
1038 | 1041 |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1089 break; | 1092 break; |
1090 case kUnsignedGreaterThan: | 1093 case kUnsignedGreaterThan: |
1091 cc = above; | 1094 cc = above; |
1092 break; | 1095 break; |
1093 case kOverflow: | 1096 case kOverflow: |
1094 cc = overflow; | 1097 cc = overflow; |
1095 break; | 1098 break; |
1096 case kNotOverflow: | 1099 case kNotOverflow: |
1097 cc = no_overflow; | 1100 cc = no_overflow; |
1098 break; | 1101 break; |
| 1102 default: |
| 1103 UNREACHABLE(); |
| 1104 break; |
1099 } | 1105 } |
1100 __ bind(&check); | 1106 __ bind(&check); |
1101 if (reg.is_byte_register()) { | 1107 if (reg.is_byte_register()) { |
1102 // setcc for byte registers (al, bl, cl, dl). | 1108 // setcc for byte registers (al, bl, cl, dl). |
1103 __ setcc(cc, reg); | 1109 __ setcc(cc, reg); |
1104 __ movzx_b(reg, reg); | 1110 __ movzx_b(reg, reg); |
1105 } else { | 1111 } else { |
1106 // Emit a branch to set a register to either 1 or 0. | 1112 // Emit a branch to set a register to either 1 or 0. |
1107 Label set; | 1113 Label set; |
1108 __ j(cc, &set, Label::kNear); | 1114 __ j(cc, &set, Label::kNear); |
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1548 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; | 1554 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; |
1549 __ Nop(padding_size); | 1555 __ Nop(padding_size); |
1550 } | 1556 } |
1551 } | 1557 } |
1552 | 1558 |
1553 #undef __ | 1559 #undef __ |
1554 | 1560 |
1555 } // namespace compiler | 1561 } // namespace compiler |
1556 } // namespace internal | 1562 } // namespace internal |
1557 } // namespace v8 | 1563 } // namespace v8 |
OLD | NEW |