Index: src/x64/disasm-x64.cc |
diff --git a/src/x64/disasm-x64.cc b/src/x64/disasm-x64.cc |
index 7735b552fed75bd666a767de4b909d504f6f5862..b432e8cf4852ca60683d857d266a9e2eae3be0e0 100644 |
--- a/src/x64/disasm-x64.cc |
+++ b/src/x64/disasm-x64.cc |
@@ -1558,9 +1558,15 @@ int DisassemblerX64::InstructionDecode(v8::internal::Vector<char> out_buffer, |
} else { |
AppendToBuffer("mov%c ", operand_size_code()); |
data += PrintRightOperand(data); |
- int32_t imm = *reinterpret_cast<int32_t*>(data); |
- AppendToBuffer(",0x%x", imm); |
- data += 4; |
+ if (operand_size() == OPERAND_WORD_SIZE) { |
+ int16_t imm = *reinterpret_cast<int16_t*>(data); |
+ AppendToBuffer(",0x%x", imm); |
+ data += 2; |
+ } else { |
+ int32_t imm = *reinterpret_cast<int32_t*>(data); |
+ AppendToBuffer(",0x%x", imm); |
+ data += 4; |
+ } |
} |
} |
break; |