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/interpreter/bytecodes.h" | 5 #include "src/interpreter/bytecodes.h" |
6 | 6 |
7 #include "src/frames.h" | 7 #include "src/frames.h" |
8 #include "src/interpreter/bytecode-traits.h" | 8 #include "src/interpreter/bytecode-traits.h" |
9 | 9 |
10 namespace v8 { | 10 namespace v8 { |
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
286 if (parameter_index == 0) { | 286 if (parameter_index == 0) { |
287 os << "<this>"; | 287 os << "<this>"; |
288 } else { | 288 } else { |
289 os << "a" << parameter_index - 1; | 289 os << "a" << parameter_index - 1; |
290 } | 290 } |
291 } else { | 291 } else { |
292 os << "r" << reg.index(); | 292 os << "r" << reg.index(); |
293 } | 293 } |
294 break; | 294 break; |
295 } | 295 } |
296 case interpreter::OperandType::kRegPair8: { | 296 case interpreter::OperandType::kRegPair8: |
| 297 case interpreter::OperandType::kRegTriple8: { |
297 Register reg = Register::FromOperand(*operand_start); | 298 Register reg = Register::FromOperand(*operand_start); |
| 299 int range = op_type == interpreter::OperandType::kRegPair8 ? 1 : 2; |
298 if (reg.is_parameter()) { | 300 if (reg.is_parameter()) { |
299 int parameter_index = reg.ToParameterIndex(parameter_count); | 301 int parameter_index = reg.ToParameterIndex(parameter_count); |
300 DCHECK_NE(parameter_index, 0); | 302 DCHECK_NE(parameter_index, 0); |
301 os << "a" << parameter_index - 1 << "-" << parameter_index; | 303 os << "a" << parameter_index - range << "-" << parameter_index; |
302 } else { | 304 } else { |
303 os << "r" << reg.index() << "-" << reg.index() + 1; | 305 os << "r" << reg.index() << "-" << reg.index() + range; |
304 } | 306 } |
305 break; | 307 break; |
306 } | 308 } |
307 case interpreter::OperandType::kReg16: { | 309 case interpreter::OperandType::kReg16: { |
308 Register reg = | 310 Register reg = |
309 Register::FromWideOperand(ReadUnalignedUInt16(operand_start)); | 311 Register::FromWideOperand(ReadUnalignedUInt16(operand_start)); |
310 if (reg.is_parameter()) { | 312 if (reg.is_parameter()) { |
311 int parameter_index = reg.ToParameterIndex(parameter_count); | 313 int parameter_index = reg.ToParameterIndex(parameter_count); |
312 DCHECK_NE(parameter_index, 0); | 314 DCHECK_NE(parameter_index, 0); |
313 os << "a" << parameter_index - 1; | 315 os << "a" << parameter_index - 1; |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
444 } | 446 } |
445 if (reg5.is_valid() && reg4.index() + 1 != reg5.index()) { | 447 if (reg5.is_valid() && reg4.index() + 1 != reg5.index()) { |
446 return false; | 448 return false; |
447 } | 449 } |
448 return true; | 450 return true; |
449 } | 451 } |
450 | 452 |
451 } // namespace interpreter | 453 } // namespace interpreter |
452 } // namespace internal | 454 } // namespace internal |
453 } // namespace v8 | 455 } // namespace v8 |
OLD | NEW |