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/instruction-selector-impl.h" | 5 #include "src/compiler/instruction-selector-impl.h" |
6 #include "src/compiler/node-matchers.h" | 6 #include "src/compiler/node-matchers.h" |
7 | 7 |
8 namespace v8 { | 8 namespace v8 { |
9 namespace internal { | 9 namespace internal { |
10 namespace compiler { | 10 namespace compiler { |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 case kMachineWord64: | 177 case kMachineWord64: |
178 opcode = kArm64LoadWord64; | 178 opcode = kArm64LoadWord64; |
179 break; | 179 break; |
180 default: | 180 default: |
181 UNREACHABLE(); | 181 UNREACHABLE(); |
182 return; | 182 return; |
183 } | 183 } |
184 if (g.CanBeImmediate(index, kLoadStoreImm)) { | 184 if (g.CanBeImmediate(index, kLoadStoreImm)) { |
185 Emit(opcode | AddressingModeField::encode(kMode_MRI), result, | 185 Emit(opcode | AddressingModeField::encode(kMode_MRI), result, |
186 g.UseRegister(base), g.UseImmediate(index)); | 186 g.UseRegister(base), g.UseImmediate(index)); |
187 } else if (g.CanBeImmediate(index, kLoadStoreImm)) { | 187 } else if (g.CanBeImmediate(base, kLoadStoreImm)) { |
188 Emit(opcode | AddressingModeField::encode(kMode_MRI), result, | 188 Emit(opcode | AddressingModeField::encode(kMode_MRI), result, |
189 g.UseRegister(index), g.UseImmediate(base)); | 189 g.UseRegister(index), g.UseImmediate(base)); |
190 } else { | 190 } else { |
191 Emit(opcode | AddressingModeField::encode(kMode_MRR), result, | 191 Emit(opcode | AddressingModeField::encode(kMode_MRR), result, |
192 g.UseRegister(base), g.UseRegister(index)); | 192 g.UseRegister(base), g.UseRegister(index)); |
193 } | 193 } |
194 } | 194 } |
195 | 195 |
196 | 196 |
197 void InstructionSelector::VisitStore(Node* node) { | 197 void InstructionSelector::VisitStore(Node* node) { |
(...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
658 // Caller clean up of stack for C-style calls. | 658 // Caller clean up of stack for C-style calls. |
659 if (is_c_frame && aligned_push_count > 0) { | 659 if (is_c_frame && aligned_push_count > 0) { |
660 DCHECK(deoptimization == NULL && continuation == NULL); | 660 DCHECK(deoptimization == NULL && continuation == NULL); |
661 Emit(kArm64Drop | MiscField::encode(aligned_push_count), NULL); | 661 Emit(kArm64Drop | MiscField::encode(aligned_push_count), NULL); |
662 } | 662 } |
663 } | 663 } |
664 | 664 |
665 } // namespace compiler | 665 } // namespace compiler |
666 } // namespace internal | 666 } // namespace internal |
667 } // namespace v8 | 667 } // namespace v8 |
OLD | NEW |