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 1264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1275 break; | 1275 break; |
1276 case kUnsignedGreaterThan: | 1276 case kUnsignedGreaterThan: |
1277 __ j(above, tlabel); | 1277 __ j(above, tlabel); |
1278 break; | 1278 break; |
1279 case kOverflow: | 1279 case kOverflow: |
1280 __ j(overflow, tlabel); | 1280 __ j(overflow, tlabel); |
1281 break; | 1281 break; |
1282 case kNotOverflow: | 1282 case kNotOverflow: |
1283 __ j(no_overflow, tlabel); | 1283 __ j(no_overflow, tlabel); |
1284 break; | 1284 break; |
| 1285 default: |
| 1286 UNREACHABLE(); |
| 1287 break; |
1285 } | 1288 } |
1286 // Add a jump if not falling through to the next block. | 1289 // Add a jump if not falling through to the next block. |
1287 if (!branch->fallthru) __ jmp(flabel); | 1290 if (!branch->fallthru) __ jmp(flabel); |
1288 } | 1291 } |
1289 | 1292 |
1290 | 1293 |
1291 void CodeGenerator::AssembleArchJump(RpoNumber target) { | 1294 void CodeGenerator::AssembleArchJump(RpoNumber target) { |
1292 if (!IsNextInAssemblyOrder(target)) __ jmp(GetLabel(target)); | 1295 if (!IsNextInAssemblyOrder(target)) __ jmp(GetLabel(target)); |
1293 } | 1296 } |
1294 | 1297 |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1345 break; | 1348 break; |
1346 case kUnsignedGreaterThan: | 1349 case kUnsignedGreaterThan: |
1347 cc = above; | 1350 cc = above; |
1348 break; | 1351 break; |
1349 case kOverflow: | 1352 case kOverflow: |
1350 cc = overflow; | 1353 cc = overflow; |
1351 break; | 1354 break; |
1352 case kNotOverflow: | 1355 case kNotOverflow: |
1353 cc = no_overflow; | 1356 cc = no_overflow; |
1354 break; | 1357 break; |
| 1358 default: |
| 1359 UNREACHABLE(); |
| 1360 break; |
1355 } | 1361 } |
1356 __ bind(&check); | 1362 __ bind(&check); |
1357 if (reg.is_byte_register()) { | 1363 if (reg.is_byte_register()) { |
1358 // setcc for byte registers (al, bl, cl, dl). | 1364 // setcc for byte registers (al, bl, cl, dl). |
1359 __ setcc(cc, reg); | 1365 __ setcc(cc, reg); |
1360 __ movzx_b(reg, reg); | 1366 __ movzx_b(reg, reg); |
1361 } else { | 1367 } else { |
1362 // Emit a branch to set a register to either 1 or 0. | 1368 // Emit a branch to set a register to either 1 or 0. |
1363 Label set; | 1369 Label set; |
1364 __ j(cc, &set, Label::kNear); | 1370 __ j(cc, &set, Label::kNear); |
(...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1854 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; | 1860 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; |
1855 __ Nop(padding_size); | 1861 __ Nop(padding_size); |
1856 } | 1862 } |
1857 } | 1863 } |
1858 | 1864 |
1859 #undef __ | 1865 #undef __ |
1860 | 1866 |
1861 } // namespace compiler | 1867 } // namespace compiler |
1862 } // namespace internal | 1868 } // namespace internal |
1863 } // namespace v8 | 1869 } // namespace v8 |
OLD | NEW |