| 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/arm/macro-assembler-arm.h" |     7 #include "src/arm/macro-assembler-arm.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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|    48   } |    48   } | 
|    49  |    49  | 
|    50   LowDwVfpRegister ToFloat64Register(InstructionOperand* op) { |    50   LowDwVfpRegister ToFloat64Register(InstructionOperand* op) { | 
|    51     return LowDwVfpRegister::from_code(ToDoubleRegister(op).code()); |    51     return LowDwVfpRegister::from_code(ToDoubleRegister(op).code()); | 
|    52   } |    52   } | 
|    53  |    53  | 
|    54   SBit OutputSBit() const { |    54   SBit OutputSBit() const { | 
|    55     switch (instr_->flags_mode()) { |    55     switch (instr_->flags_mode()) { | 
|    56       case kFlags_branch: |    56       case kFlags_branch: | 
|    57       case kFlags_set: |    57       case kFlags_set: | 
 |    58       case kFlags_select: | 
|    58         return SetCC; |    59         return SetCC; | 
|    59       case kFlags_none: |    60       case kFlags_none: | 
|    60         return LeaveCC; |    61         return LeaveCC; | 
|    61     } |    62     } | 
|    62     UNREACHABLE(); |    63     UNREACHABLE(); | 
|    63     return LeaveCC; |    64     return LeaveCC; | 
|    64   } |    65   } | 
|    65  |    66  | 
|    66   Operand InputImmediate(size_t index) { |    67   Operand InputImmediate(size_t index) { | 
|    67     Constant constant = ToConstant(instr_->InputAt(index)); |    68     Constant constant = ToConstant(instr_->InputAt(index)); | 
| (...skipping 842 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   910   // Materialize a full 32-bit 1 or 0 value. The result register is always the |   911   // Materialize a full 32-bit 1 or 0 value. The result register is always the | 
|   911   // last output of the instruction. |   912   // last output of the instruction. | 
|   912   DCHECK_NE(0u, instr->OutputCount()); |   913   DCHECK_NE(0u, instr->OutputCount()); | 
|   913   Register reg = i.OutputRegister(instr->OutputCount() - 1); |   914   Register reg = i.OutputRegister(instr->OutputCount() - 1); | 
|   914   Condition cc = FlagsConditionToCondition(condition); |   915   Condition cc = FlagsConditionToCondition(condition); | 
|   915   __ mov(reg, Operand(0)); |   916   __ mov(reg, Operand(0)); | 
|   916   __ mov(reg, Operand(1), LeaveCC, cc); |   917   __ mov(reg, Operand(1), LeaveCC, cc); | 
|   917 } |   918 } | 
|   918  |   919  | 
|   919  |   920  | 
 |   921 void CodeGenerator::AssembleArchSelect(Instruction* instr, | 
 |   922                                        FlagsCondition condition) { | 
 |   923   // Unsupported. | 
 |   924   UNREACHABLE(); | 
 |   925 } | 
 |   926  | 
 |   927  | 
|   920 void CodeGenerator::AssembleArchLookupSwitch(Instruction* instr) { |   928 void CodeGenerator::AssembleArchLookupSwitch(Instruction* instr) { | 
|   921   ArmOperandConverter i(this, instr); |   929   ArmOperandConverter i(this, instr); | 
|   922   Register input = i.InputRegister(0); |   930   Register input = i.InputRegister(0); | 
|   923   for (size_t index = 2; index < instr->InputCount(); index += 2) { |   931   for (size_t index = 2; index < instr->InputCount(); index += 2) { | 
|   924     __ cmp(input, Operand(i.InputInt32(index + 0))); |   932     __ cmp(input, Operand(i.InputInt32(index + 0))); | 
|   925     __ b(eq, GetLabel(i.InputRpo(index + 1))); |   933     __ b(eq, GetLabel(i.InputRpo(index + 1))); | 
|   926   } |   934   } | 
|   927   AssembleArchJump(i.InputRpo(1)); |   935   AssembleArchJump(i.InputRpo(1)); | 
|   928 } |   936 } | 
|   929  |   937  | 
| (...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  1262       padding_size -= v8::internal::Assembler::kInstrSize; |  1270       padding_size -= v8::internal::Assembler::kInstrSize; | 
|  1263     } |  1271     } | 
|  1264   } |  1272   } | 
|  1265 } |  1273 } | 
|  1266  |  1274  | 
|  1267 #undef __ |  1275 #undef __ | 
|  1268  |  1276  | 
|  1269 }  // namespace compiler |  1277 }  // namespace compiler | 
|  1270 }  // namespace internal |  1278 }  // namespace internal | 
|  1271 }  // namespace v8 |  1279 }  // namespace v8 | 
| OLD | NEW |