| OLD | NEW |
| 1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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/base/adapters.h" | 5 #include "src/base/adapters.h" |
| 6 #include "src/compiler/instruction-selector-impl.h" | 6 #include "src/compiler/instruction-selector-impl.h" |
| 7 #include "src/compiler/node-matchers.h" | 7 #include "src/compiler/node-matchers.h" |
| 8 #include "src/compiler/node-properties.h" | 8 #include "src/compiler/node-properties.h" |
| 9 #include "src/s390/frames-s390.h" | 9 #include "src/s390/frames-s390.h" |
| 10 | 10 |
| (...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 311 } else if (g.CanBeImmediate(base, mode)) { | 311 } else if (g.CanBeImmediate(base, mode)) { |
| 312 Emit(opcode | AddressingModeField::encode(kMode_MRI), g.NoOutput(), | 312 Emit(opcode | AddressingModeField::encode(kMode_MRI), g.NoOutput(), |
| 313 g.UseRegister(offset), g.UseImmediate(base), g.UseRegister(value)); | 313 g.UseRegister(offset), g.UseImmediate(base), g.UseRegister(value)); |
| 314 } else { | 314 } else { |
| 315 Emit(opcode | AddressingModeField::encode(kMode_MRR), g.NoOutput(), | 315 Emit(opcode | AddressingModeField::encode(kMode_MRR), g.NoOutput(), |
| 316 g.UseRegister(base), g.UseRegister(offset), g.UseRegister(value)); | 316 g.UseRegister(base), g.UseRegister(offset), g.UseRegister(value)); |
| 317 } | 317 } |
| 318 } | 318 } |
| 319 } | 319 } |
| 320 | 320 |
| 321 // Architecture supports unaligned access, therefore VisitLoad is used instead |
| 322 void InstructionSelector::VisitUnalignedLoad(Node* node) { UNREACHABLE(); } |
| 323 |
| 324 // Architecture supports unaligned access, therefore VisitStore is used instead |
| 325 void InstructionSelector::VisitUnalignedStore(Node* node) { UNREACHABLE(); } |
| 326 |
| 321 void InstructionSelector::VisitCheckedLoad(Node* node) { | 327 void InstructionSelector::VisitCheckedLoad(Node* node) { |
| 322 CheckedLoadRepresentation load_rep = CheckedLoadRepresentationOf(node->op()); | 328 CheckedLoadRepresentation load_rep = CheckedLoadRepresentationOf(node->op()); |
| 323 S390OperandGenerator g(this); | 329 S390OperandGenerator g(this); |
| 324 Node* const base = node->InputAt(0); | 330 Node* const base = node->InputAt(0); |
| 325 Node* const offset = node->InputAt(1); | 331 Node* const offset = node->InputAt(1); |
| 326 Node* const length = node->InputAt(2); | 332 Node* const length = node->InputAt(2); |
| 327 ArchOpcode opcode = kArchNop; | 333 ArchOpcode opcode = kArchNop; |
| 328 switch (load_rep.representation()) { | 334 switch (load_rep.representation()) { |
| 329 case MachineRepresentation::kWord8: | 335 case MachineRepresentation::kWord8: |
| 330 opcode = load_rep.IsSigned() ? kCheckedLoadInt8 : kCheckedLoadUint8; | 336 opcode = load_rep.IsSigned() ? kCheckedLoadInt8 : kCheckedLoadUint8; |
| (...skipping 1566 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1897 // static | 1903 // static |
| 1898 MachineOperatorBuilder::AlignmentRequirements | 1904 MachineOperatorBuilder::AlignmentRequirements |
| 1899 InstructionSelector::AlignmentRequirements() { | 1905 InstructionSelector::AlignmentRequirements() { |
| 1900 return MachineOperatorBuilder::AlignmentRequirements:: | 1906 return MachineOperatorBuilder::AlignmentRequirements:: |
| 1901 FullUnalignedAccessSupport(); | 1907 FullUnalignedAccessSupport(); |
| 1902 } | 1908 } |
| 1903 | 1909 |
| 1904 } // namespace compiler | 1910 } // namespace compiler |
| 1905 } // namespace internal | 1911 } // namespace internal |
| 1906 } // namespace v8 | 1912 } // namespace v8 |
| OLD | NEW |