| 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/arm64/assembler-arm64-inl.h" | 7 #include "src/arm64/assembler-arm64-inl.h" |
| 8 #include "src/arm64/frames-arm64.h" | 8 #include "src/arm64/frames-arm64.h" |
| 9 #include "src/arm64/macro-assembler-arm64-inl.h" | 9 #include "src/arm64/macro-assembler-arm64-inl.h" |
| 10 #include "src/compilation-info.h" | 10 #include "src/compilation-info.h" |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 | 76 |
| 77 Register InputOrZeroRegister64(size_t index) { | 77 Register InputOrZeroRegister64(size_t index) { |
| 78 DCHECK(instr_->InputAt(index)->IsRegister() || | 78 DCHECK(instr_->InputAt(index)->IsRegister() || |
| 79 (instr_->InputAt(index)->IsImmediate() && (InputInt64(index) == 0))); | 79 (instr_->InputAt(index)->IsImmediate() && (InputInt64(index) == 0))); |
| 80 if (instr_->InputAt(index)->IsImmediate()) { | 80 if (instr_->InputAt(index)->IsImmediate()) { |
| 81 return xzr; | 81 return xzr; |
| 82 } | 82 } |
| 83 return InputRegister64(index); | 83 return InputRegister64(index); |
| 84 } | 84 } |
| 85 | 85 |
| 86 Operand InputImmediate(size_t index) { | |
| 87 return ToImmediate(instr_->InputAt(index)); | |
| 88 } | |
| 89 | |
| 90 Operand InputOperand(size_t index) { | 86 Operand InputOperand(size_t index) { |
| 91 return ToOperand(instr_->InputAt(index)); | 87 return ToOperand(instr_->InputAt(index)); |
| 92 } | 88 } |
| 93 | 89 |
| 94 Operand InputOperand64(size_t index) { return InputOperand(index); } | 90 Operand InputOperand64(size_t index) { return InputOperand(index); } |
| 95 | 91 |
| 96 Operand InputOperand32(size_t index) { | 92 Operand InputOperand32(size_t index) { |
| 97 return ToOperand32(instr_->InputAt(index)); | 93 return ToOperand32(instr_->InputAt(index)); |
| 98 } | 94 } |
| 99 | 95 |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 return Operand(constant.ToInt32()); | 214 return Operand(constant.ToInt32()); |
| 219 } | 215 } |
| 220 case Constant::kInt64: | 216 case Constant::kInt64: |
| 221 if (RelocInfo::IsWasmPtrReference(constant.rmode())) { | 217 if (RelocInfo::IsWasmPtrReference(constant.rmode())) { |
| 222 return Operand(constant.ToInt64(), constant.rmode()); | 218 return Operand(constant.ToInt64(), constant.rmode()); |
| 223 } else { | 219 } else { |
| 224 DCHECK(!RelocInfo::IsWasmSizeReference(constant.rmode())); | 220 DCHECK(!RelocInfo::IsWasmSizeReference(constant.rmode())); |
| 225 return Operand(constant.ToInt64()); | 221 return Operand(constant.ToInt64()); |
| 226 } | 222 } |
| 227 case Constant::kFloat32: | 223 case Constant::kFloat32: |
| 228 return Operand( | 224 return Operand(Operand::EmbeddedNumber(constant.ToFloat32())); |
| 229 isolate()->factory()->NewNumber(constant.ToFloat32(), TENURED)); | |
| 230 case Constant::kFloat64: | 225 case Constant::kFloat64: |
| 231 return Operand( | 226 return Operand(Operand::EmbeddedNumber(constant.ToFloat64())); |
| 232 isolate()->factory()->NewNumber(constant.ToFloat64(), TENURED)); | |
| 233 case Constant::kExternalReference: | 227 case Constant::kExternalReference: |
| 234 return Operand(constant.ToExternalReference()); | 228 return Operand(constant.ToExternalReference()); |
| 235 case Constant::kHeapObject: | 229 case Constant::kHeapObject: |
| 236 return Operand(constant.ToHeapObject()); | 230 return Operand(constant.ToHeapObject()); |
| 237 case Constant::kRpoNumber: | 231 case Constant::kRpoNumber: |
| 238 UNREACHABLE(); // TODO(dcarney): RPO immediates on arm64. | 232 UNREACHABLE(); // TODO(dcarney): RPO immediates on arm64. |
| 239 break; | 233 break; |
| 240 } | 234 } |
| 241 UNREACHABLE(); | 235 UNREACHABLE(); |
| 242 } | 236 } |
| (...skipping 2093 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2336 padding_size -= kInstructionSize; | 2330 padding_size -= kInstructionSize; |
| 2337 } | 2331 } |
| 2338 } | 2332 } |
| 2339 } | 2333 } |
| 2340 | 2334 |
| 2341 #undef __ | 2335 #undef __ |
| 2342 | 2336 |
| 2343 } // namespace compiler | 2337 } // namespace compiler |
| 2344 } // namespace internal | 2338 } // namespace internal |
| 2345 } // namespace v8 | 2339 } // namespace v8 |
| OLD | NEW |