Commit e71e8e83 authored by Caitlin Potter's avatar Caitlin Potter Committed by Commit Bot

[interpreter] use GetRegisterCountOperand for OperandType::kRegOutList

Fixes a crash in PrintRegisters() with --trace-ignition and the
RestoreGeneratorRegisters bytecode.

BUG=v8:4280, v8:6351
R=rmcilroy@chromium.org, mythria@chromium.org, adamk@chromium.org

Change-Id: I09e86523b71fb9e5763e0373c567925f38227913
Reviewed-on: https://chromium-review.googlesource.com/523843
Commit-Queue: Caitlin Potter <caitp@igalia.com>
Reviewed-by: 's avatarRoss McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45706}
parent 0ef0fc50
...@@ -142,7 +142,8 @@ int BytecodeArrayAccessor::GetRegisterOperandRange(int operand_index) const { ...@@ -142,7 +142,8 @@ int BytecodeArrayAccessor::GetRegisterOperandRange(int operand_index) const {
Bytecodes::GetOperandTypes(current_bytecode()); Bytecodes::GetOperandTypes(current_bytecode());
OperandType operand_type = operand_types[operand_index]; OperandType operand_type = operand_types[operand_index];
DCHECK(Bytecodes::IsRegisterOperandType(operand_type)); DCHECK(Bytecodes::IsRegisterOperandType(operand_type));
if (operand_type == OperandType::kRegList) { if (operand_type == OperandType::kRegList ||
operand_type == OperandType::kRegOutList) {
return GetRegisterCountOperand(operand_index + 1); return GetRegisterCountOperand(operand_index + 1);
} else { } else {
return Bytecodes::GetNumberOfRegistersRepresentedBy(operand_type); return Bytecodes::GetNumberOfRegistersRepresentedBy(operand_type);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment