Index: src/x64/disasm-x64.cc |
diff --git a/src/x64/disasm-x64.cc b/src/x64/disasm-x64.cc |
index 9b558839780186abdd55081c41fcd731bb466eb8..dcbba9fc81af7c96060c77bc4c294adbfe1ed960 100644 |
--- a/src/x64/disasm-x64.cc |
+++ b/src/x64/disasm-x64.cc |
@@ -1486,15 +1486,15 @@ int DisassemblerX64::InstructionDecode(v8::internal::Vector<char> out_buffer, |
case 0x69: // fall through |
case 0x6B: { |
- int mod, regop, rm; |
- get_modrm(*(data + 1), &mod, ®op, &rm); |
- int32_t imm = *data == 0x6B ? *(data + 2) |
- : *reinterpret_cast<int32_t*>(data + 2); |
- AppendToBuffer("imul%c %s,%s,0x%x", |
- operand_size_code(), |
- NameOfCPURegister(regop), |
- NameOfCPURegister(rm), imm); |
- data += 2 + (*data == 0x6B ? 1 : 4); |
+ int count = 1; |
+ count += PrintOperands("imul", REG_OPER_OP_ORDER, data + count); |
+ AppendToBuffer(",0x"); |
+ if (*data == 0x69) { |
+ count += PrintImmediate(data + count, operand_size()); |
+ } else { |
+ count += PrintImmediate(data + count, OPERAND_BYTE_SIZE); |
+ } |
+ data += count; |
break; |
} |