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/frames-arm64.h" | 7 #include "src/arm64/frames-arm64.h" |
8 #include "src/arm64/macro-assembler-arm64.h" | 8 #include "src/arm64/macro-assembler-arm64.h" |
9 #include "src/ast/scopes.h" | 9 #include "src/ast/scopes.h" |
10 #include "src/compiler/code-generator-impl.h" | 10 #include "src/compiler/code-generator-impl.h" |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 Operand ToImmediate(InstructionOperand* operand) { | 203 Operand ToImmediate(InstructionOperand* operand) { |
204 Constant constant = ToConstant(operand); | 204 Constant constant = ToConstant(operand); |
205 switch (constant.type()) { | 205 switch (constant.type()) { |
206 case Constant::kInt32: | 206 case Constant::kInt32: |
207 if (constant.rmode() == RelocInfo::WASM_MEMORY_SIZE_REFERENCE) { | 207 if (constant.rmode() == RelocInfo::WASM_MEMORY_SIZE_REFERENCE) { |
208 return Operand(constant.ToInt32(), constant.rmode()); | 208 return Operand(constant.ToInt32(), constant.rmode()); |
209 } else { | 209 } else { |
210 return Operand(constant.ToInt32()); | 210 return Operand(constant.ToInt32()); |
211 } | 211 } |
212 case Constant::kInt64: | 212 case Constant::kInt64: |
213 if (constant.rmode() == RelocInfo::WASM_MEMORY_REFERENCE) { | 213 if (constant.rmode() == RelocInfo::WASM_MEMORY_REFERENCE || |
| 214 constant.rmode() == RelocInfo::WASM_GLOBAL_REFERENCE) { |
214 return Operand(constant.ToInt64(), constant.rmode()); | 215 return Operand(constant.ToInt64(), constant.rmode()); |
215 } else { | 216 } else { |
216 DCHECK(constant.rmode() != RelocInfo::WASM_MEMORY_SIZE_REFERENCE); | 217 DCHECK(constant.rmode() != RelocInfo::WASM_MEMORY_SIZE_REFERENCE); |
217 return Operand(constant.ToInt64()); | 218 return Operand(constant.ToInt64()); |
218 } | 219 } |
219 case Constant::kFloat32: | 220 case Constant::kFloat32: |
220 return Operand( | 221 return Operand( |
221 isolate()->factory()->NewNumber(constant.ToFloat32(), TENURED)); | 222 isolate()->factory()->NewNumber(constant.ToFloat32(), TENURED)); |
222 case Constant::kFloat64: | 223 case Constant::kFloat64: |
223 return Operand( | 224 return Operand( |
(...skipping 1727 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1951 padding_size -= kInstructionSize; | 1952 padding_size -= kInstructionSize; |
1952 } | 1953 } |
1953 } | 1954 } |
1954 } | 1955 } |
1955 | 1956 |
1956 #undef __ | 1957 #undef __ |
1957 | 1958 |
1958 } // namespace compiler | 1959 } // namespace compiler |
1959 } // namespace internal | 1960 } // namespace internal |
1960 } // namespace v8 | 1961 } // namespace v8 |
OLD | NEW |