summaryrefslogtreecommitdiffstats
path: root/disassembler/disassembler_x86.cc
diff options
context:
space:
mode:
authorVladimir Kostyukov <vladimir.kostyukov@intel.com>2014-04-15 15:41:47 +0700
committerVladimir Kostyukov <vladimir.kostyukov@intel.com>2014-04-17 13:17:30 +0700
commitfba52f1b4bf753790c1d98265c4b0fabb54c7536 (patch)
treea9feb49c87ae2ec5cde2dd45913840e1f9977ade /disassembler/disassembler_x86.cc
parent9623c6668962559e818d1e7f05a58dcb96c71fa9 (diff)
downloadandroid_art-fba52f1b4bf753790c1d98265c4b0fabb54c7536.tar.gz
android_art-fba52f1b4bf753790c1d98265c4b0fabb54c7536.tar.bz2
android_art-fba52f1b4bf753790c1d98265c4b0fabb54c7536.zip
ART: Fixes an issue with REX prefix for instructions with no ModRM byte
There are instructions (such as push, pop, mov) in the x86 ISA that encode first operands in their opcodes (opcode + reg). In order to enable an extended 64bit registers (R9-R15) a special prefix REX.B should be emitted before such instructions. This patch fixes the issue when REX.R prefix was emitted before instructions with no MorRM byte. So, the REX-prefix was simply ignored by CPU for those instructions whose operands are encoded in their opcodes. This patch makes the jni_compiler_test passed with JNI compiler enabled for x86_64 target. Change-Id: Ib84da1cf9f8ff96bd7afd4e0fc53078f3231f8ec Signed-off-by: Vladimir Kostyukov <vladimir.kostyukov@intel.com>
Diffstat (limited to 'disassembler/disassembler_x86.cc')
-rw-r--r--disassembler/disassembler_x86.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/disassembler/disassembler_x86.cc b/disassembler/disassembler_x86.cc
index 68e77d44e4..1b96a2bf01 100644
--- a/disassembler/disassembler_x86.cc
+++ b/disassembler/disassembler_x86.cc
@@ -735,7 +735,7 @@ DISASSEMBLER_ENTRY(cmp,
std::ostringstream args;
if (reg_in_opcode) {
DCHECK(!has_modrm);
- DumpReg(args, rex, *instr & 0x7, false, prefix[2], GPR);
+ DumpBaseReg(args, rex, *instr & 0x7);
}
instr++;
uint32_t address_bits = 0;