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/compilation-info.h" | 7 #include "src/compilation-info.h" |
8 #include "src/compiler/code-generator-impl.h" | 8 #include "src/compiler/code-generator-impl.h" |
9 #include "src/compiler/gap-resolver.h" | 9 #include "src/compiler/gap-resolver.h" |
10 #include "src/compiler/node-matchers.h" | 10 #include "src/compiler/node-matchers.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 PPCOperandConverter(CodeGenerator* gen, Instruction* instr) | 27 PPCOperandConverter(CodeGenerator* gen, Instruction* instr) |
28 : InstructionOperandConverter(gen, instr) {} | 28 : InstructionOperandConverter(gen, instr) {} |
29 | 29 |
30 size_t OutputCount() { return instr_->OutputCount(); } | 30 size_t OutputCount() { return instr_->OutputCount(); } |
31 | 31 |
32 RCBit OutputRCBit() const { | 32 RCBit OutputRCBit() const { |
33 switch (instr_->flags_mode()) { | 33 switch (instr_->flags_mode()) { |
34 case kFlags_branch: | 34 case kFlags_branch: |
35 case kFlags_deoptimize: | 35 case kFlags_deoptimize: |
36 case kFlags_set: | 36 case kFlags_set: |
| 37 case kFlags_trap: |
37 return SetRC; | 38 return SetRC; |
38 case kFlags_none: | 39 case kFlags_none: |
39 return LeaveRC; | 40 return LeaveRC; |
40 } | 41 } |
41 UNREACHABLE(); | 42 UNREACHABLE(); |
42 return LeaveRC; | 43 return LeaveRC; |
43 } | 44 } |
44 | 45 |
45 bool CompareLogical() const { | 46 bool CompareLogical() const { |
46 switch (instr_->flags_condition()) { | 47 switch (instr_->flags_condition()) { |
(...skipping 1948 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1995 } | 1996 } |
1996 __ b(cond, tlabel, cr); | 1997 __ b(cond, tlabel, cr); |
1997 if (!branch->fallthru) __ b(flabel); // no fallthru to flabel. | 1998 if (!branch->fallthru) __ b(flabel); // no fallthru to flabel. |
1998 } | 1999 } |
1999 | 2000 |
2000 | 2001 |
2001 void CodeGenerator::AssembleArchJump(RpoNumber target) { | 2002 void CodeGenerator::AssembleArchJump(RpoNumber target) { |
2002 if (!IsNextInAssemblyOrder(target)) __ b(GetLabel(target)); | 2003 if (!IsNextInAssemblyOrder(target)) __ b(GetLabel(target)); |
2003 } | 2004 } |
2004 | 2005 |
| 2006 void CodeGenerator::AssembleArchTrap(Instruction* instr, |
| 2007 FlagsCondition condition) { |
| 2008 UNREACHABLE(); |
| 2009 } |
2005 | 2010 |
2006 // Assembles boolean materializations after an instruction. | 2011 // Assembles boolean materializations after an instruction. |
2007 void CodeGenerator::AssembleArchBoolean(Instruction* instr, | 2012 void CodeGenerator::AssembleArchBoolean(Instruction* instr, |
2008 FlagsCondition condition) { | 2013 FlagsCondition condition) { |
2009 PPCOperandConverter i(this, instr); | 2014 PPCOperandConverter i(this, instr); |
2010 Label done; | 2015 Label done; |
2011 ArchOpcode op = instr->arch_opcode(); | 2016 ArchOpcode op = instr->arch_opcode(); |
2012 CRegister cr = cr0; | 2017 CRegister cr = cr0; |
2013 int reg_value = -1; | 2018 int reg_value = -1; |
2014 | 2019 |
(...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2475 padding_size -= v8::internal::Assembler::kInstrSize; | 2480 padding_size -= v8::internal::Assembler::kInstrSize; |
2476 } | 2481 } |
2477 } | 2482 } |
2478 } | 2483 } |
2479 | 2484 |
2480 #undef __ | 2485 #undef __ |
2481 | 2486 |
2482 } // namespace compiler | 2487 } // namespace compiler |
2483 } // namespace internal | 2488 } // namespace internal |
2484 } // namespace v8 | 2489 } // namespace v8 |
OLD | NEW |