diff options
author | Ian Rogers <irogers@google.com> | 2014-05-30 20:26:12 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2014-05-30 20:26:12 +0000 |
commit | e4e04bbd86d1131b9f380a52a46b1a3b83335d5f (patch) | |
tree | b56931ad3ad83b28d6888ecdac80efd32b1e2a37 | |
parent | afa8e909b7fbf53cb45573c458c031d3174069c9 (diff) | |
parent | 67d18be2a5bddbd8ee9ef144b34ccaeba08a1db2 (diff) | |
download | android_art-e4e04bbd86d1131b9f380a52a46b1a3b83335d5f.tar.gz android_art-e4e04bbd86d1131b9f380a52a46b1a3b83335d5f.tar.bz2 android_art-e4e04bbd86d1131b9f380a52a46b1a3b83335d5f.zip |
Merge "Support disassembly of 16-bit immediates"
-rw-r--r-- | disassembler/disassembler_x86.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/disassembler/disassembler_x86.cc b/disassembler/disassembler_x86.cc index cba4ebf4e8..614eca1710 100644 --- a/disassembler/disassembler_x86.cc +++ b/disassembler/disassembler_x86.cc @@ -1040,8 +1040,13 @@ DISASSEMBLER_ENTRY(cmp, instr++; } else { CHECK_EQ(immediate_bytes, 4u); - args << StringPrintf("%d", *reinterpret_cast<const int32_t*>(instr)); - instr += 4; + if (prefix[2] == 0x66) { // Operand size override from 32-bit to 16-bit. + args << StringPrintf("%d", *reinterpret_cast<const int16_t*>(instr)); + instr += 2; + } else { + args << StringPrintf("%d", *reinterpret_cast<const int32_t*>(instr)); + instr += 4; + } } } else if (branch_bytes > 0) { DCHECK(!has_modrm); |