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 | 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 13 matching lines...) Expand all Loading... |
24 // Adds PPC-specific methods to convert InstructionOperands. | 24 // Adds PPC-specific methods to convert InstructionOperands. |
25 class PPCOperandConverter final : public InstructionOperandConverter { | 25 class PPCOperandConverter final : public InstructionOperandConverter { |
26 public: | 26 public: |
27 PPCOperandConverter(CodeGenerator* gen, Instruction* instr) | 27 PPCOperandConverter(CodeGenerator* gen, Instruction* instr) |
28 : InstructionOperandConverter(gen, instr) {} | 28 : InstructionOperandConverter(gen, instr) {} |
29 | 29 |
30 RCBit OutputRCBit() const { | 30 RCBit OutputRCBit() const { |
31 switch (instr_->flags_mode()) { | 31 switch (instr_->flags_mode()) { |
32 case kFlags_branch: | 32 case kFlags_branch: |
33 case kFlags_set: | 33 case kFlags_set: |
| 34 case kFlags_select: |
34 return SetRC; | 35 return SetRC; |
35 case kFlags_none: | 36 case kFlags_none: |
36 return LeaveRC; | 37 return LeaveRC; |
37 } | 38 } |
38 UNREACHABLE(); | 39 UNREACHABLE(); |
39 return LeaveRC; | 40 return LeaveRC; |
40 } | 41 } |
41 | 42 |
42 bool CompareLogical() const { | 43 bool CompareLogical() const { |
43 switch (instr_->flags_condition()) { | 44 switch (instr_->flags_condition()) { |
(...skipping 1229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1273 } | 1274 } |
1274 break; | 1275 break; |
1275 default: | 1276 default: |
1276 UNREACHABLE(); | 1277 UNREACHABLE(); |
1277 break; | 1278 break; |
1278 } | 1279 } |
1279 __ bind(&done); | 1280 __ bind(&done); |
1280 } | 1281 } |
1281 | 1282 |
1282 | 1283 |
| 1284 void CodeGenerator::AssembleArchSelect(Instruction* instr, |
| 1285 FlagsCondition condition) { |
| 1286 // Unsupported. |
| 1287 UNREACHABLE(); |
| 1288 } |
| 1289 |
| 1290 |
1283 void CodeGenerator::AssembleArchLookupSwitch(Instruction* instr) { | 1291 void CodeGenerator::AssembleArchLookupSwitch(Instruction* instr) { |
1284 PPCOperandConverter i(this, instr); | 1292 PPCOperandConverter i(this, instr); |
1285 Register input = i.InputRegister(0); | 1293 Register input = i.InputRegister(0); |
1286 for (size_t index = 2; index < instr->InputCount(); index += 2) { | 1294 for (size_t index = 2; index < instr->InputCount(); index += 2) { |
1287 __ Cmpi(input, Operand(i.InputInt32(index + 0)), r0); | 1295 __ Cmpi(input, Operand(i.InputInt32(index + 0)), r0); |
1288 __ beq(GetLabel(i.InputRpo(index + 1))); | 1296 __ beq(GetLabel(i.InputRpo(index + 1))); |
1289 } | 1297 } |
1290 AssembleArchJump(i.InputRpo(1)); | 1298 AssembleArchJump(i.InputRpo(1)); |
1291 } | 1299 } |
1292 | 1300 |
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1626 padding_size -= v8::internal::Assembler::kInstrSize; | 1634 padding_size -= v8::internal::Assembler::kInstrSize; |
1627 } | 1635 } |
1628 } | 1636 } |
1629 } | 1637 } |
1630 | 1638 |
1631 #undef __ | 1639 #undef __ |
1632 | 1640 |
1633 } // namespace compiler | 1641 } // namespace compiler |
1634 } // namespace internal | 1642 } // namespace internal |
1635 } // namespace v8 | 1643 } // namespace v8 |
OLD | NEW |